Skip to content

Support for OpenSSL 3.0 #599

@nazar-pc

Description

@nazar-pc

In 3.0 some APIs were deprecated that results in this warnings:

[1025/1321] Compiling C object subprojects/libsrtp-2.4.2/libsrtp2.a.p/crypto_hash_hmac_ossl.c.o
../../../subprojects/libsrtp-2.4.2/crypto/hash/hmac_ossl.c: In function ‘srtp_hmac_alloc’:
../../../subprojects/libsrtp-2.4.2/crypto/hash/hmac_ossl.c:106:5: warning: ‘HMAC_CTX_new’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  106 |     (*a)->state = HMAC_CTX_new();
      |     ^
In file included from ../../../subprojects/libsrtp-2.4.2/crypto/hash/hmac_ossl.c:54:
../../../subprojects/openssl-3.0.2/include/openssl/hmac.h:33:33: note: declared here
   33 | OSSL_DEPRECATEDIN_3_0 HMAC_CTX *HMAC_CTX_new(void);
      |                                 ^~~~~~~~~~~~
../../../subprojects/libsrtp-2.4.2/crypto/hash/hmac_ossl.c: In function ‘srtp_hmac_dealloc’:
../../../subprojects/libsrtp-2.4.2/crypto/hash/hmac_ossl.c:136:5: warning: ‘HMAC_CTX_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  136 |     HMAC_CTX_free(hmac_ctx);
      |     ^~~~~~~~~~~~~
In file included from ../../../subprojects/libsrtp-2.4.2/crypto/hash/hmac_ossl.c:54:
../../../subprojects/openssl-3.0.2/include/openssl/hmac.h:35:28: note: declared here
   35 | OSSL_DEPRECATEDIN_3_0 void HMAC_CTX_free(HMAC_CTX *ctx);
      |                            ^~~~~~~~~~~~~
../../../subprojects/libsrtp-2.4.2/crypto/hash/hmac_ossl.c: In function ‘srtp_hmac_start’:
../../../subprojects/libsrtp-2.4.2/crypto/hash/hmac_ossl.c:152:5: warning: ‘HMAC_Init_ex’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  152 |     if (HMAC_Init_ex(state, NULL, 0, NULL, NULL) == 0)
      |     ^~
In file included from ../../../subprojects/libsrtp-2.4.2/crypto/hash/hmac_ossl.c:54:
../../../subprojects/openssl-3.0.2/include/openssl/hmac.h:43:27: note: declared here
   43 | OSSL_DEPRECATEDIN_3_0 int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
      |                           ^~~~~~~~~~~~
../../../subprojects/libsrtp-2.4.2/crypto/hash/hmac_ossl.c: In function ‘srtp_hmac_init’:
../../../subprojects/libsrtp-2.4.2/crypto/hash/hmac_ossl.c:164:5: warning: ‘HMAC_Init_ex’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  164 |     if (HMAC_Init_ex(state, key, key_len, EVP_sha1(), NULL) == 0)
      |     ^~
In file included from ../../../subprojects/libsrtp-2.4.2/crypto/hash/hmac_ossl.c:54:
../../../subprojects/openssl-3.0.2/include/openssl/hmac.h:43:27: note: declared here
   43 | OSSL_DEPRECATEDIN_3_0 int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
      |                           ^~~~~~~~~~~~
../../../subprojects/libsrtp-2.4.2/crypto/hash/hmac_ossl.c: In function ‘srtp_hmac_update’:
../../../subprojects/libsrtp-2.4.2/crypto/hash/hmac_ossl.c:179:5: warning: ‘HMAC_Update’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  179 |     if (HMAC_Update(state, message, msg_octets) == 0)
      |     ^~
In file included from ../../../subprojects/libsrtp-2.4.2/crypto/hash/hmac_ossl.c:54:
../../../subprojects/openssl-3.0.2/include/openssl/hmac.h:45:27: note: declared here
   45 | OSSL_DEPRECATEDIN_3_0 int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data,
      |                           ^~~~~~~~~~~
../../../subprojects/libsrtp-2.4.2/crypto/hash/hmac_ossl.c: In function ‘srtp_hmac_compute’:
../../../subprojects/libsrtp-2.4.2/crypto/hash/hmac_ossl.c:205:5: warning: ‘HMAC_Update’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  205 |     if (HMAC_Update(state, message, msg_octets) == 0)
      |     ^~
In file included from ../../../subprojects/libsrtp-2.4.2/crypto/hash/hmac_ossl.c:54:
../../../subprojects/openssl-3.0.2/include/openssl/hmac.h:45:27: note: declared here
   45 | OSSL_DEPRECATEDIN_3_0 int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data,
      |                           ^~~~~~~~~~~
../../../subprojects/libsrtp-2.4.2/crypto/hash/hmac_ossl.c:208:5: warning: ‘HMAC_Final’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  208 |     if (HMAC_Final(state, hash_value, &len) == 0)
      |     ^~
In file included from ../../../subprojects/libsrtp-2.4.2/crypto/hash/hmac_ossl.c:54:
../../../subprojects/openssl-3.0.2/include/openssl/hmac.h:47:27: note: declared here
   47 | OSSL_DEPRECATEDIN_3_0 int HMAC_Final(HMAC_CTX *ctx, unsigned char *md,
      |                           ^~~~~~~~~~

Would be nice to get them fixes in upcoming releases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions