OpenSSL: Determine RSA key size without low-level routines
RSA low-level routines were deprecated in OpenSSL 3.0. EVP_PKEY_get_bits(), or its older and more backwards compatible name EVP_PKEY_bits() can be used here instead. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
b700a56e14
commit
09c62aaf11
1 changed files with 1 additions and 6 deletions
|
@ -2529,16 +2529,11 @@ static int tls_verify_cb(int preverify_ok, X509_STORE_CTX *x509_ctx)
|
|||
#ifdef CONFIG_SUITEB
|
||||
if (conn->flags & TLS_CONN_SUITEB) {
|
||||
EVP_PKEY *pk;
|
||||
RSA *rsa;
|
||||
int len = -1;
|
||||
|
||||
pk = X509_get_pubkey(err_cert);
|
||||
if (pk) {
|
||||
rsa = EVP_PKEY_get1_RSA(pk);
|
||||
if (rsa) {
|
||||
len = RSA_bits(rsa);
|
||||
RSA_free(rsa);
|
||||
}
|
||||
len = EVP_PKEY_bits(pk);
|
||||
EVP_PKEY_free(pk);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue