Skip to content

Commit 5ba30a2

Browse files
committed
fix openssl3 deprecation warnings
1 parent 78db7ef commit 5ba30a2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/idevice_ext.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,13 @@ int idevice_ext_connection_enable_ssl(const char *device_id, int fd, SSL **to_se
9999
X509_free(rootCert);
100100
free(root_cert.data);
101101

102-
RSA* rootPrivKey = NULL;
102+
EVP_PKEY* rootPrivKey = NULL;
103103
membp = BIO_new_mem_buf(root_privkey.data, root_privkey.size);
104-
PEM_read_bio_RSAPrivateKey(membp, &rootPrivKey, NULL, NULL);
104+
PEM_read_bio_PrivateKey(membp, &rootPrivKey, NULL, NULL);
105105
BIO_free(membp);
106-
SSL_CTX_use_RSAPrivateKey(ssl_ctx, rootPrivKey);
107-
RSA_free(rootPrivKey);
106+
SSL_CTX_use_PrivateKey(ssl_ctx, rootPrivKey);
107+
EVP_PKEY_free(rootPrivKey);
108+
108109
free(root_privkey.data);
109110

110111
SSL *ssl = SSL_new(ssl_ctx);

0 commit comments

Comments
 (0)