1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-04 14:33:14 +02:00

Workaround compiler warning with openssl version below 1.1.0-pre3,

This commit is contained in:
k4be
2021-09-10 17:02:19 +02:00
parent e13815b604
commit b2718379d7
+5
View File
@@ -956,8 +956,13 @@ unsigned char* extjwt_sha_pem_extjwt_hash(int method, const void *key, int keyle
continue;
}
#if (OPENSSL_VERSION_NUMBER < 0x10100003L) /* https://github.com/openssl/openssl/commit/8ab31975bacb9c907261088937d3aa4102e3af84 */
if (!(bufkey = BIO_new_mem_buf((void *)key, keylen)))
break; /* out of memory */
#else
if (!(bufkey = BIO_new_mem_buf(key, keylen)))
break; /* out of memory */
#endif
if (!(pkey = PEM_read_bio_PrivateKey(bufkey, NULL, NULL, NULL)))
break; /* invalid key? */
pkey_type = EVP_PKEY_id(pkey);