Browse Source

Explicitly cache the X509v3_extensions in one more place in libssl

Make sure we cache the extensions for a cert using the right libctx.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/11457)
master
Matt Caswell 2 years ago
parent
commit
e66c37deb6
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      ssl/ssl_rsa.c

+ 6
- 0
ssl/ssl_rsa.c View File

@ -1055,9 +1055,15 @@ static int ssl_set_cert_and_key(SSL *ssl, SSL_CTX *ctx, X509 *x509, EVP_PKEY *pr
int j;
int rv;
CERT *c = ssl != NULL ? ssl->cert : ctx->cert;
SSL_CTX *actualctx = ssl == NULL ? ctx : ssl->ctx;
STACK_OF(X509) *dup_chain = NULL;
EVP_PKEY *pubkey = NULL;
if (!X509v3_cache_extensions(x509, actualctx->libctx, actualctx->propq)) {
SSLerr(0, ERR_R_X509_LIB);
goto out;
}
/* Do all security checks before anything else */
rv = ssl_security_cert(ssl, ctx, x509, 0, 1);
if (rv != 1) {


Loading…
Cancel
Save