From: Tomas Mraz Date: Fri, 11 Sep 2020 13:27:23 +0000 (+0200) Subject: Rename check_chain_extensions to check_chain X-Git-Tag: openssl-3.0.0-alpha7~215 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=67ecd65cc4fdaa03fbae5fcccf53ebca7d785554;p=thirdparty%2Fopenssl.git Rename check_chain_extensions to check_chain The function does much more than just checking extensions. Reviewed-by: David von Oheimb Reviewed-by: Nicola Tuveri (Merged from https://github.com/openssl/openssl/pull/12683) --- diff --git a/crypto/x509/v3_purp.c b/crypto/x509/v3_purp.c index 92f3bbe3b0d..8b0dfd97595 100644 --- a/crypto/x509/v3_purp.c +++ b/crypto/x509/v3_purp.c @@ -431,7 +431,7 @@ int x509v3_cache_extensions(X509 *x) x->ex_flags |= EXFLAG_CA; if (bs->pathlen != NULL) { /* - * the error case !bs->ca is checked by check_chain_extensions() + * the error case !bs->ca is checked by check_chain() * in case ctx->param->flags & X509_V_FLAG_X509_STRICT */ if (bs->pathlen->type == V_ASN1_NEG_INTEGER) { diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c index f9f52f957b0..3d6c665aedb 100644 --- a/crypto/x509/x509_vfy.c +++ b/crypto/x509/x509_vfy.c @@ -69,7 +69,7 @@ static int dane_verify(X509_STORE_CTX *ctx); static int null_callback(int ok, X509_STORE_CTX *e); static int check_issued(X509_STORE_CTX *ctx, X509 *x, X509 *issuer); static X509 *find_issuer(X509_STORE_CTX *ctx, STACK_OF(X509) *sk, X509 *x); -static int check_chain_extensions(X509_STORE_CTX *ctx); +static int check_chain(X509_STORE_CTX *ctx); static int check_name_constraints(X509_STORE_CTX *ctx); static int check_id(X509_STORE_CTX *ctx); static int check_trust(X509_STORE_CTX *ctx, int num_untrusted); @@ -222,7 +222,7 @@ static int verify_chain(X509_STORE_CTX *ctx) * instantiate chain public key parameters. */ if ((ok = build_chain(ctx)) == 0 || - (ok = check_chain_extensions(ctx)) == 0 || + (ok = check_chain(ctx)) == 0 || (ok = check_auth_level(ctx)) == 0 || (ok = check_id(ctx)) == 0 || 1) X509_get_pubkey_parameters(NULL, ctx->chain); @@ -441,7 +441,7 @@ static int check_purpose(X509_STORE_CTX *ctx, X509 *x, int purpose, int depth, * purpose */ -static int check_chain_extensions(X509_STORE_CTX *ctx) +static int check_chain(X509_STORE_CTX *ctx) { int i, must_be_ca, plen = 0; X509 *x;