OpenSSL: Do not use the deprecated RSAPrivateKey function

Comment out the call to SSL_use_RSAPrivateKey_ASN1() function when using
OpenSSL 3.0 since that function was deprecated and there does not seem
to be any significant use case for supporting DER encoded RSAPrivateKey
structure in the private key blob.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2022-04-16 12:45:32 +03:00
parent ebb3055e13
commit 6a2a60f1db

View file

@ -3831,6 +3831,7 @@ static int tls_connection_private_key(struct tls_data *data,
}
#endif /* OPENSSL_NO_EC */
#if OPENSSL_VERSION_NUMBER < 0x30000000L
if (SSL_use_RSAPrivateKey_ASN1(conn->ssl,
(u8 *) private_key_blob,
private_key_blob_len) == 1) {
@ -3839,6 +3840,7 @@ static int tls_connection_private_key(struct tls_data *data,
ok = 1;
break;
}
#endif
bio = BIO_new_mem_buf((u8 *) private_key_blob,
private_key_blob_len);