From: Jouni Malinen Date: Sat, 16 Apr 2022 09:45:32 +0000 (+0300) Subject: OpenSSL: Do not use the deprecated RSAPrivateKey function X-Git-Tag: hostap_2_11~2055 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a2a60f1db2d316f4265a310d38fce8f3ceaf8cf;p=thirdparty%2Fhostap.git 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 --- 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);