diff options
author | Matt Caswell <matt@openssl.org> | 2020-03-18 13:57:48 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2020-03-23 12:23:26 +0100 |
commit | 3aceb9ec51beb2ec266c2aba75ee14721c693659 (patch) | |
tree | 0d1172ec360c709eb42a2bd55c8bf42b8df0e5c5 | |
parent | Update CA.pl podpage, and script (diff) | |
download | openssl-3aceb9ec51beb2ec266c2aba75ee14721c693659.tar.xz openssl-3aceb9ec51beb2ec266c2aba75ee14721c693659.zip |
Use the libctx and properties when constructing an EVP_PKEY_CTX
When constructing an RSA ClientKeyExchange make sure we construct our
EVP_PKEY_CTX using the correct libctx and properties
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/11357)
-rw-r--r-- | ssl/statem/statem_clnt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ssl/statem/statem_clnt.c b/ssl/statem/statem_clnt.c index 99459a8c6a..dfc6f5a721 100644 --- a/ssl/statem/statem_clnt.c +++ b/ssl/statem/statem_clnt.c @@ -2990,7 +2990,8 @@ static int tls_construct_cke_rsa(SSL *s, WPACKET *pkt) ERR_R_INTERNAL_ERROR); goto err; } - pctx = EVP_PKEY_CTX_new(pkey, NULL); + + pctx = EVP_PKEY_CTX_new_from_pkey(s->ctx->libctx, pkey, s->ctx->propq); if (pctx == NULL || EVP_PKEY_encrypt_init(pctx) <= 0 || EVP_PKEY_encrypt(pctx, NULL, &enclen, pms, pmslen) <= 0) { SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_TLS_CONSTRUCT_CKE_RSA, |