diff options
Diffstat (limited to 'ssl/statem/statem_lib.c')
-rw-r--r-- | ssl/statem/statem_lib.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/ssl/statem/statem_lib.c b/ssl/statem/statem_lib.c index e9cfee027e..71a259e8f0 100644 --- a/ssl/statem/statem_lib.c +++ b/ssl/statem/statem_lib.c @@ -14,6 +14,7 @@ #include "../ssl_local.h" #include "statem_local.h" #include "internal/cryptlib.h" +#include "internal/evp.h" #include <openssl/buffer.h> #include <openssl/objects.h> #include <openssl/evp.h> @@ -1531,7 +1532,6 @@ static int is_tls13_capable(const SSL *s) int i; #ifndef OPENSSL_NO_EC int curve; - EC_KEY *eckey; #endif #ifndef OPENSSL_NO_PSK @@ -1563,10 +1563,8 @@ static int is_tls13_capable(const SSL *s) * more restrictive so check that our sig algs are consistent with this * EC cert. See section 4.2.3 of RFC8446. */ - eckey = EVP_PKEY_get0_EC_KEY(s->cert->pkeys[SSL_PKEY_ECC].privatekey); - if (eckey == NULL) - continue; - curve = EC_GROUP_get_curve_name(EC_KEY_get0_group(eckey)); + curve = evp_pkey_get_EC_KEY_curve_nid(s->cert->pkeys[SSL_PKEY_ECC] + .privatekey); if (tls_check_sigalg_curve(s, curve)) return 1; #else |