From 8d59d69449c2a86c478699a50d920541aa106201 Mon Sep 17 00:00:00 2001 From: Julien Chaffraix Date: Sat, 13 Nov 2010 12:01:33 -0800 Subject: security: tighten enum protection_level usage. While changing Curl_sec_read_msg to accept an enum protection_level instead of an int, I went ahead and fixed the usage of the associated fields. Some code was assuming that prot_clear == 0. Fixed those to use the proper value. Added assertions prior to any code that would set the protection level. --- lib/urldata.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/urldata.h') diff --git a/lib/urldata.h b/lib/urldata.h index 16f365ae8..06bbcda86 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -200,11 +200,13 @@ struct krb4buffer { int eof_flag; }; enum protection_level { + prot_none, /* first in list */ prot_clear, prot_safe, prot_confidential, prot_private, - prot_cmd + prot_cmd, + prot_last /* last in list */ }; #endif -- cgit v1.2.3