patch-libs_srtp_crypto_hash_hmac_ossl_c 1.0 KB

12345678910111213141516171819202122
  1. --- freeswitch-1.10.11.orig/libs/srtp/crypto/hash/hmac_ossl.c 2023-12-22 19:08:31.000000000 +0100
  2. +++ freeswitch-1.10.11/libs/srtp/crypto/hash/hmac_ossl.c 2024-02-29 00:19:04.687821875 +0100
  3. @@ -80,7 +80,8 @@ static srtp_err_status_t srtp_hmac_alloc
  4. /* OpenSSL 1.1.0 made HMAC_CTX an opaque structure, which must be allocated
  5. using HMAC_CTX_new. But this function doesn't exist in OpenSSL 1.0.x. */
  6. -#if OPENSSL_VERSION_NUMBER < 0x10100000L || LIBRESSL_VERSION_NUMBER
  7. +#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
  8. + (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x30500000L)
  9. {
  10. /* allocate memory for auth and HMAC_CTX structures */
  11. uint8_t *pointer;
  12. @@ -126,7 +127,8 @@ static srtp_err_status_t srtp_hmac_deall
  13. hmac_ctx = (HMAC_CTX *)a->state;
  14. -#if OPENSSL_VERSION_NUMBER < 0x10100000L || LIBRESSL_VERSION_NUMBER
  15. +#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
  16. + (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x30500000L)
  17. HMAC_CTX_cleanup(hmac_ctx);
  18. /* zeroize entire state*/