@@ -224,11 +224,11 @@ typedef struct ASNItem {
224224 /* BER/DER tag to expect. */
225225 byte tag ;
226226 /* Whether the ASN.1 item is constructed. */
227- byte constructed :1 ;
227+ WC_BITFIELD constructed :1 ;
228228 /* Whether to parse the header only or skip data. If
229229 * ASNSetData.data.buffer.data is supplied then this option gets
230230 * overwritten and the child nodes get ignored. */
231- byte headerOnly :1 ;
231+ WC_BITFIELD headerOnly :1 ;
232232 /* Whether ASN.1 item is optional.
233233 * - 0 means not optional
234234 * - 1 means is optional
@@ -1273,8 +1273,9 @@ enum Extensions_Sum {
12731273#ifdef WOLFSSL_DUAL_ALG_CERTS
12741274 SUBJ_ALT_PUB_KEY_INFO_OID = 186 , /* 2.5.29.72 subject alt public key info */
12751275 ALT_SIG_ALG_OID = 187 , /* 2.5.29.73 alt sig alg */
1276- ALT_SIG_VAL_OID = 188 /* 2.5.29.74 alt sig val */
1276+ ALT_SIG_VAL_OID = 188 , /* 2.5.29.74 alt sig val */
12771277#endif
1278+ WOLF_ENUM_DUMMY_LAST_ELEMENT (Extensions_Sum )
12781279};
12791280
12801281enum CertificatePolicy_Sum {
@@ -1941,63 +1942,63 @@ struct DecodedCert {
19411942 int criticalExt ;
19421943
19431944 /* Option Bits */
1944- byte subjectCNStored : 1 ; /* have we saved a copy we own */
1945- byte extSubjKeyIdSet : 1 ; /* Set when the SKID was read from cert */
1946- byte extAuthKeyIdSet : 1 ; /* Set when the AKID was read from cert */
1945+ WC_BITFIELD subjectCNStored : 1 ; /* have we saved a copy we own */
1946+ WC_BITFIELD extSubjKeyIdSet : 1 ; /* Set when the SKID was read from cert */
1947+ WC_BITFIELD extAuthKeyIdSet : 1 ; /* Set when the AKID was read from cert */
19471948#ifndef IGNORE_NAME_CONSTRAINTS
1948- byte extNameConstraintSet : 1 ;
1949+ WC_BITFIELD extNameConstraintSet : 1 ;
19491950#endif
1950- byte isCA : 1 ; /* CA basic constraint true */
1951- byte pathLengthSet : 1 ; /* CA basic const path length set */
1952- byte weOwnAltNames : 1 ; /* altNames haven't been given to copy */
1953- byte extKeyUsageSet : 1 ;
1954- byte extExtKeyUsageSet : 1 ; /* Extended Key Usage set */
1951+ WC_BITFIELD isCA : 1 ; /* CA basic constraint true */
1952+ WC_BITFIELD pathLengthSet : 1 ; /* CA basic const path length set */
1953+ WC_BITFIELD weOwnAltNames : 1 ; /* altNames haven't been given to copy */
1954+ WC_BITFIELD extKeyUsageSet : 1 ;
1955+ WC_BITFIELD extExtKeyUsageSet : 1 ; /* Extended Key Usage set */
19551956#ifdef HAVE_OCSP
1956- byte ocspNoCheckSet : 1 ; /* id-pkix-ocsp-nocheck set */
1957- #endif
1958- byte extCRLdistSet : 1 ;
1959- byte extAuthInfoSet : 1 ;
1960- byte extBasicConstSet : 1 ;
1961- byte extPolicyConstSet : 1 ;
1962- byte extPolicyConstRxpSet : 1 ; /* requireExplicitPolicy set */
1963- byte extPolicyConstIpmSet : 1 ; /* inhibitPolicyMapping set */
1964- byte extSubjAltNameSet : 1 ;
1965- byte inhibitAnyOidSet : 1 ;
1966- byte selfSigned : 1 ; /* Indicates subject and issuer are same */
1957+ WC_BITFIELD ocspNoCheckSet : 1 ; /* id-pkix-ocsp-nocheck set */
1958+ #endif
1959+ WC_BITFIELD extCRLdistSet : 1 ;
1960+ WC_BITFIELD extAuthInfoSet : 1 ;
1961+ WC_BITFIELD extBasicConstSet : 1 ;
1962+ WC_BITFIELD extPolicyConstSet : 1 ;
1963+ WC_BITFIELD extPolicyConstRxpSet : 1 ; /* requireExplicitPolicy set */
1964+ WC_BITFIELD extPolicyConstIpmSet : 1 ; /* inhibitPolicyMapping set */
1965+ WC_BITFIELD extSubjAltNameSet : 1 ;
1966+ WC_BITFIELD inhibitAnyOidSet : 1 ;
1967+ WC_BITFIELD selfSigned : 1 ; /* Indicates subject and issuer are same */
19671968#ifdef WOLFSSL_SEP
1968- byte extCertPolicySet : 1 ;
1969- #endif
1970- byte extCRLdistCrit : 1 ;
1971- byte extAuthInfoCrit : 1 ;
1972- byte extBasicConstCrit : 1 ;
1973- byte extPolicyConstCrit : 1 ;
1974- byte extSubjAltNameCrit : 1 ;
1975- byte extAuthKeyIdCrit : 1 ;
1969+ WC_BITFIELD extCertPolicySet : 1 ;
1970+ #endif
1971+ WC_BITFIELD extCRLdistCrit : 1 ;
1972+ WC_BITFIELD extAuthInfoCrit : 1 ;
1973+ WC_BITFIELD extBasicConstCrit : 1 ;
1974+ WC_BITFIELD extPolicyConstCrit : 1 ;
1975+ WC_BITFIELD extSubjAltNameCrit : 1 ;
1976+ WC_BITFIELD extAuthKeyIdCrit : 1 ;
19761977#ifndef IGNORE_NAME_CONSTRAINTS
1977- byte extNameConstraintCrit : 1 ;
1978+ WC_BITFIELD extNameConstraintCrit : 1 ;
19781979#endif
1979- byte extSubjKeyIdCrit : 1 ;
1980- byte extKeyUsageCrit : 1 ;
1981- byte extExtKeyUsageCrit : 1 ;
1980+ WC_BITFIELD extSubjKeyIdCrit : 1 ;
1981+ WC_BITFIELD extKeyUsageCrit : 1 ;
1982+ WC_BITFIELD extExtKeyUsageCrit : 1 ;
19821983#ifdef WOLFSSL_SUBJ_DIR_ATTR
1983- byte extSubjDirAttrSet : 1 ;
1984+ WC_BITFIELD extSubjDirAttrSet : 1 ;
19841985#endif
19851986#ifdef WOLFSSL_SUBJ_INFO_ACC
1986- byte extSubjInfoAccSet : 1 ;
1987+ WC_BITFIELD extSubjInfoAccSet : 1 ;
19871988#endif
19881989#ifdef WOLFSSL_DUAL_ALG_CERTS
1989- byte extSapkiSet : 1 ;
1990- byte extAltSigAlgSet : 1 ;
1991- byte extAltSigValSet : 1 ;
1990+ WC_BITFIELD extSapkiSet : 1 ;
1991+ WC_BITFIELD extAltSigAlgSet : 1 ;
1992+ WC_BITFIELD extAltSigValSet : 1 ;
19921993#endif /* WOLFSSL_DUAL_ALG_CERTS */
19931994#ifdef WOLFSSL_SEP
1994- byte extCertPolicyCrit : 1 ;
1995+ WC_BITFIELD extCertPolicyCrit : 1 ;
19951996#endif
19961997#ifdef WOLFSSL_CERT_REQ
1997- byte isCSR : 1 ; /* Do we intend on parsing a CSR? */
1998+ WC_BITFIELD isCSR : 1 ; /* Do we intend on parsing a CSR? */
19981999#endif
19992000#ifdef HAVE_RPK
2000- byte isRPK : 1 ; /* indicate the cert is Raw-Public-Key cert in RFC7250 */
2001+ WC_BITFIELD isRPK : 1 ; /* indicate the cert is Raw-Public-Key cert in RFC7250 */
20012002#endif
20022003#ifdef WC_ASN_UNKNOWN_EXT_CB
20032004 wc_UnknownExtCallback unknownExtCallback ;
@@ -2034,7 +2035,7 @@ struct Signer {
20342035 word32 keyOID ; /* key type */
20352036 word16 keyUsage ;
20362037 byte maxPathLen ;
2037- byte selfSigned : 1 ;
2038+ WC_BITFIELD selfSigned : 1 ;
20382039 const byte * publicKey ;
20392040 int nameLen ;
20402041 char * name ; /* common name */
@@ -2572,10 +2573,10 @@ struct OcspEntry
25722573 byte * rawCertId ; /* raw bytes of the CertID */
25732574 int rawCertIdSize ; /* num bytes in raw CertID */
25742575 /* option bits - using 32-bit for alignment */
2575- word32 ownStatus :1 ; /* do we need to free the status
2576+ WC_BITFIELD ownStatus :1 ; /* do we need to free the status
25762577 * response list */
2577- word32 isDynamic :1 ; /* was dynamically allocated */
2578- word32 used :1 ; /* entry used */
2578+ WC_BITFIELD isDynamic :1 ; /* was dynamically allocated */
2579+ WC_BITFIELD used :1 ; /* entry used */
25792580};
25802581
25812582/* TODO: Long-term, it would be helpful if we made this struct and other OCSP
0 commit comments