mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 23:25:38 +00:00
Refactor the OpenSSL HMAC usage to use newer APIs
OpenSSL 3 deprecates the HMAC* family and associated APIs. Rewrite portions of OpenSSL library usage code to use a newer set of HMAC APIs.
This commit is contained in:
@@ -27,6 +27,11 @@ CRYPTO_zalloc(size_t num, const char *file, int line);
|
||||
#define OPENSSL_zalloc(num) CRYPTO_zalloc(num, __FILE__, __LINE__)
|
||||
#endif
|
||||
|
||||
#if !HAVE_EVP_PKEY_NEW_RAW_PRIVATE_KEY
|
||||
#define EVP_PKEY_new_raw_private_key(type, e, key, keylen) \
|
||||
EVP_PKEY_new_mac_key(type, e, key, (int)(keylen))
|
||||
#endif /* if !HAVE_EVP_PKEY_NEW_RAW_PRIVATE_KEY */
|
||||
|
||||
#if !HAVE_EVP_CIPHER_CTX_NEW
|
||||
EVP_CIPHER_CTX *
|
||||
EVP_CIPHER_CTX_new(void);
|
||||
@@ -54,26 +59,6 @@ EVP_MD_CTX_reset(EVP_MD_CTX *ctx);
|
||||
#define EVP_MD_CTX_get0_md EVP_MD_CTX_md
|
||||
#endif /* if !HAVE_EVP_MD_CTX_GET0_MD */
|
||||
|
||||
#if !HAVE_HMAC_CTX_NEW
|
||||
HMAC_CTX *
|
||||
HMAC_CTX_new(void);
|
||||
#endif /* if !HAVE_HMAC_CTX_NEW */
|
||||
|
||||
#if !HAVE_HMAC_CTX_FREE
|
||||
void
|
||||
HMAC_CTX_free(HMAC_CTX *ctx);
|
||||
#endif /* if !HAVE_HMAC_CTX_FREE */
|
||||
|
||||
#if !HAVE_HMAC_CTX_RESET
|
||||
int
|
||||
HMAC_CTX_reset(HMAC_CTX *ctx);
|
||||
#endif /* if !HAVE_HMAC_CTX_RESET */
|
||||
|
||||
#if !HAVE_HMAC_CTX_GET_MD
|
||||
const EVP_MD *
|
||||
HMAC_CTX_get_md(const HMAC_CTX *ctx);
|
||||
#endif /* if !HAVE_HMAC_CTX_GET_MD */
|
||||
|
||||
#if !HAVE_SSL_READ_EX
|
||||
int
|
||||
SSL_read_ex(SSL *ssl, void *buf, size_t num, size_t *readbytes);
|
||||
|
Reference in New Issue
Block a user