Skip to content

Commit dec061f

Browse files
committed
CONC-503: Support for OpenSSL 3.0
Minor fix for building with latest OpenSSL 3.0 beta: replaced RSA_size function by EVP_KEY api calls.
1 parent e4e5b28 commit dec061f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

plugins/auth/caching_sha2_pw.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,12 @@ static int auth_caching_sha2_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql)
338338
bio= BIO_new_mem_buf(filebuffer ? (unsigned char *)filebuffer : packet,
339339
packet_length);
340340
if ((pubkey= PEM_read_bio_RSA_PUBKEY(bio, NULL, NULL, NULL)))
341-
rsa_size= RSA_size(pubkey);
341+
{
342+
EVP_PKEY *pkey= EVP_PKEY_new();
343+
EVP_PKEY_assign_RSA(pkey, pubkey);
344+
rsa_size= EVP_PKEY_size(pkey);
345+
EVP_PKEY_free(pkey);
346+
}
342347
BIO_free(bio);
343348
ERR_clear_error();
344349
#elif defined(HAVE_WINCRYPT)

0 commit comments

Comments
 (0)