net/libsrtp2: Fix build with libressl 3.5

Approved by:		tijl (maintainer), tcberner (mentor)
Differential Revision:	https://reviews.freebsd.org/D37050
This commit is contained in:
Felix Palmen 2022-10-17 13:32:00 +02:00
parent e3122de1db
commit 6a2d461fd3

View File

@ -0,0 +1,20 @@
--- crypto/hash/hmac_ossl.c.orig 2022-10-17 11:30:42 UTC
+++ crypto/hash/hmac_ossl.c
@@ -80,7 +80,7 @@ static srtp_err_status_t srtp_hmac_alloc(srtp_auth_t *
/* OpenSSL 1.1.0 made HMAC_CTX an opaque structure, which must be allocated
using HMAC_CTX_new. But this function doesn't exist in OpenSSL 1.0.x. */
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || LIBRESSL_VERSION_NUMBER
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
{
/* allocate memory for auth and HMAC_CTX structures */
uint8_t *pointer;
@@ -126,7 +126,7 @@ static srtp_err_status_t srtp_hmac_dealloc(srtp_auth_t
hmac_ctx = (HMAC_CTX *)a->state;
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || LIBRESSL_VERSION_NUMBER
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
HMAC_CTX_cleanup(hmac_ctx);
/* zeroize entire state*/