mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
Check the return from EVP_PKEY_get0_DH()
Fixes #5934 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5983)
This commit is contained in:
parent
7d4488bbd7
commit
a682365728
@ -2481,6 +2481,12 @@ int tls_construct_server_key_exchange(SSL *s, WPACKET *pkt)
|
||||
}
|
||||
|
||||
dh = EVP_PKEY_get0_DH(s->s3->tmp.pkey);
|
||||
if (dh == NULL) {
|
||||
SSLfatal(s, SSL_AD_INTERNAL_ERROR,
|
||||
SSL_F_TLS_CONSTRUCT_SERVER_KEY_EXCHANGE,
|
||||
ERR_R_INTERNAL_ERROR);
|
||||
goto err;
|
||||
}
|
||||
|
||||
EVP_PKEY_free(pkdh);
|
||||
pkdh = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user