From: Tobias Brunner Date: Fri, 17 Mar 2023 16:24:41 +0000 (+0100) Subject: pki: Fix enum for SCEP CA capabilities X-Git-Tag: 5.9.11dr1~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8bf683c469e15dd34482a8a81a1c5ce08a5ea144;p=thirdparty%2Fstrongswan.git pki: Fix enum for SCEP CA capabilities As indicated by the comparisons and the parsing in scep_parse_caps() this should be a bitmask. Fixes: 7c7a5a0260ca ("pki: Enroll an X.509 certificate with a SCEP server") Closes strongswan/strongswan#1607 --- diff --git a/src/pki/scep/scep.h b/src/pki/scep/scep.h index 4e97110136..12f994357a 100644 --- a/src/pki/scep/scep.h +++ b/src/pki/scep/scep.h @@ -75,17 +75,17 @@ typedef struct { /* SCEP CA Capabilities */ typedef enum { - SCEP_CAPS_AES = 0, - SCEP_CAPS_DES3 = 1, - SCEP_CAPS_SHA256 = 2, - SCEP_CAPS_SHA384 = 3, - SCEP_CAPS_SHA512 = 4, - SCEP_CAPS_SHA224 = 5, - SCEP_CAPS_SHA1 = 6, - SCEP_CAPS_POSTPKIOPERATION = 7, - SCEP_CAPS_SCEPSTANDARD = 8, - SCEP_CAPS_GETNEXTCACERT = 9, - SCEP_CAPS_RENEWAL = 10 + SCEP_CAPS_AES = (1<<0), + SCEP_CAPS_DES3 = (1<<1), + SCEP_CAPS_SHA256 = (1<<2), + SCEP_CAPS_SHA384 = (1<<3), + SCEP_CAPS_SHA512 = (1<<4), + SCEP_CAPS_SHA224 = (1<<5), + SCEP_CAPS_SHA1 = (1<<6), + SCEP_CAPS_POSTPKIOPERATION = (1<<7), + SCEP_CAPS_SCEPSTANDARD = (1<<8), + SCEP_CAPS_GETNEXTCACERT = (1<<9), + SCEP_CAPS_RENEWAL = (1<<10), } scep_caps_t; extern const scep_attributes_t empty_scep_attributes;