diff --git a/libs/srtp/crypto/hash/hmac_ossl.c b/libs/srtp/crypto/hash/hmac_ossl.c index ee6b0b5851..38f653b77a 100644 --- a/libs/srtp/crypto/hash/hmac_ossl.c +++ b/libs/srtp/crypto/hash/hmac_ossl.c @@ -80,7 +80,8 @@ static srtp_err_status_t srtp_hmac_alloc(srtp_auth_t **a, /* 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 || \ + (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x30500000L) { /* allocate memory for auth and HMAC_CTX structures */ uint8_t *pointer; @@ -126,7 +127,8 @@ static srtp_err_status_t srtp_hmac_dealloc(srtp_auth_t *a) hmac_ctx = (HMAC_CTX *)a->state; -#if OPENSSL_VERSION_NUMBER < 0x10100000L || LIBRESSL_VERSION_NUMBER +#if OPENSSL_VERSION_NUMBER < 0x10100000L || \ + (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x30500000L) HMAC_CTX_cleanup(hmac_ctx); /* zeroize entire state*/