]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
OpenSSL: Do not use the deprecated RSAPrivateKey function
authorJouni Malinen <j@w1.fi>
Sat, 16 Apr 2022 09:45:32 +0000 (12:45 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 16 Apr 2022 09:45:32 +0000 (12:45 +0300)
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>
src/crypto/tls_openssl.c

index 65ffd03a2866aa81aab70f77c3145ffa369d381a..270d45fa2020f7fc67ca0259c05fc7c648683dd5 100644 (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);