Ignore:
Timestamp:
Sep 22, 2017 2:42:22 AM (2 years ago)
Author:
ming
Message:

Re #1993: With the update of bundled libSRTP to 2.1, external SRTP needs to be of version 2.x as well. This changeset will allow external SRTP users the option to continue using their current version 1.x.

  • Also add autodetection of external SRTP version via the configure script.

Thanks to Alexander Traud for the report.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/transport_srtp.c

    r5640 r5656  
    4545#endif 
    4646 
    47 #if defined(PJMEDIA_EXTERNAL_SRTP) && (PJMEDIA_EXTERNAL_SRTP != 0) 
     47#if defined(PJMEDIA_EXTERNAL_SRTP) 
     48 
     49#if (PJMEDIA_EXTERNAL_SRTP == 1)        /* External SRTP 1.x */ 
    4850#  include <srtp/srtp.h> 
    4951#  include <srtp/crypto_kernel.h> 
    50 #else 
     52#define srtp_crypto_policy_t            crypto_policy_t 
     53#define srtp_cipher_type_id_t           cipher_type_id_t 
     54#define srtp_cipher_type_t              cipher_type_t 
     55#define srtp_auth_type_id_t             auth_type_id_t 
     56#define srtp_sec_serv_t                 sec_serv_t 
     57#define srtp_err_status_t               err_status_t 
     58#define srtp_err_status_ok              err_status_ok 
     59#define srtp_err_status_replay_old      err_status_replay_old 
     60#define srtp_err_status_replay_fail     err_status_replay_fail 
     61#define srtp_crypto_policy_set_aes_cm_256_hmac_sha1_32 \ 
     62             crypto_policy_set_aes_cm_256_hmac_sha1_32 
     63#define srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80 \ 
     64             crypto_policy_set_aes_cm_256_hmac_sha1_80 
     65#define SRTP_NULL_CIPHER                NULL_CIPHER 
     66#define SRTP_NULL_AUTH                  NULL_AUTH 
     67#define SRTP_AES_ICM_128                AES_ICM 
     68#define SRTP_AES_ICM_256                AES_ICM 
     69#define SRTP_HMAC_SHA1                  HMAC_SHA1 
     70 
     71#else                                   /* External SRTP 2.x */ 
     72#  include <srtp2/srtp.h> 
     73#  include <srtp2/cipher.h> 
     74#endif 
     75 
     76#else                                   /* Bundled SRTP */ 
    5177#  include <srtp.h> 
    5278#  include <crypto_kernel.h> 
Note: See TracChangeset for help on using the changeset viewer.