From 6a2a60f1db2d316f4265a310d38fce8f3ceaf8cf Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 16 Apr 2022 12:45:32 +0300 Subject: [PATCH] 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 --- src/crypto/tls_openssl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/crypto/tls_openssl.c b/src/crypto/tls_openssl.c index 65ffd03a2..270d45fa2 100644 --- a/src/crypto/tls_openssl.c +++ b/src/crypto/tls_openssl.c @@ -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); -- 2.47.3