diff --git a/src/crypto/x509/internal.h b/src/crypto/x509/internal.h index 72d0f9bd8..e56f243b0 100644 --- a/src/crypto/x509/internal.h +++ b/src/crypto/x509/internal.h @@ -218,7 +218,6 @@ struct X509_crl_st { ISSUING_DIST_POINT *idp; // Convenient breakdown of IDP int idp_flags; - int idp_reasons; unsigned char crl_hash[SHA256_DIGEST_LENGTH]; STACK_OF(GENERAL_NAMES) *issuers; } /* X509_CRL */; diff --git a/src/crypto/x509/x509_vfy.c b/src/crypto/x509/x509_vfy.c index 1abbc00b5..c83de7d1e 100644 --- a/src/crypto/x509/x509_vfy.c +++ b/src/crypto/x509/x509_vfy.c @@ -1257,7 +1257,7 @@ static int crl_crldp_check(X509 *x, X509_CRL *crl, int crl_score, return 0; } } - *preasons = crl->idp_reasons; + *preasons = CRLDP_ALL_REASONS; for (i = 0; i < sk_DIST_POINT_num(x->crldp); i++) { DIST_POINT *dp = sk_DIST_POINT_value(x->crldp, i); if (crldp_check_crlissuer(dp, crl, crl_score)) { diff --git a/src/crypto/x509/x_crl.c b/src/crypto/x509/x_crl.c index e7b5edad6..c99952324 100644 --- a/src/crypto/x509/x_crl.c +++ b/src/crypto/x509/x_crl.c @@ -190,7 +190,6 @@ static int crl_set_issuers(X509_CRL *crl) { static int crl_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg) { X509_CRL *crl = (X509_CRL *)*pval; - size_t idx; int i; switch (operation) { @@ -199,7 +198,6 @@ static int crl_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, crl->akid = NULL; crl->flags = 0; crl->idp_flags = 0; - crl->idp_reasons = CRLDP_ALL_REASONS; crl->issuers = NULL; break; @@ -248,7 +246,7 @@ static int crl_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, // critical sets the flag. This code accesses the X509_CRL structure // directly: applications shouldn't do this. const STACK_OF(X509_EXTENSION) *exts = crl->crl->extensions; - for (idx = 0; idx < sk_X509_EXTENSION_num(exts); idx++) { + for (size_t idx = 0; idx < sk_X509_EXTENSION_num(exts); idx++) { const X509_EXTENSION *ext = sk_X509_EXTENSION_value(exts, idx); int nid = OBJ_obj2nid(X509_EXTENSION_get_object(ext)); if (X509_EXTENSION_get_critical(ext)) { @@ -306,13 +304,6 @@ static int setup_idp(X509_CRL *crl, ISSUING_DIST_POINT *idp) { if (idp->onlysomereasons) { crl->idp_flags |= IDP_REASONS; - if (idp->onlysomereasons->length > 0) { - crl->idp_reasons = idp->onlysomereasons->data[0]; - } - if (idp->onlysomereasons->length > 1) { - crl->idp_reasons |= (idp->onlysomereasons->data[1] << 8); - } - crl->idp_reasons &= CRLDP_ALL_REASONS; } return DIST_POINT_set_dpname(idp->distpoint, X509_CRL_get_issuer(crl));