Ignore:
Timestamp:
Mar 15, 2016 3:57:39 AM (5 years ago)
Author:
nanang
Message:

Close #1847: Upgraded libsrtp version to 1.5.4 and added support for AES-CM-256 crypto.

File:
1 edited

Legend:

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

    r5219 r5261  
    4848#else 
    4949#  include <srtp.h> 
     50#  include <crypto_kernel.h> 
    5051#endif 
    5152 
     
    8889    /* plain RTP/RTCP (no cipher & no auth) */ 
    8990    {"NULL", NULL_CIPHER, 0, NULL_AUTH, 0, 0, 0, sec_serv_none}, 
     91 
     92    /* cipher AES_CM_256, auth HMAC_SHA1, auth tag len = 10 octets */ 
     93    {"AES_CM_256_HMAC_SHA1_80", AES_ICM, 46, HMAC_SHA1, 20, 10, 10, 
     94        sec_serv_conf_and_auth}, 
     95 
     96    /* cipher AES_CM_256, auth HMAC_SHA1, auth tag len = 10 octets */ 
     97    {"AES_CM_256_HMAC_SHA1_32", AES_ICM, 46, HMAC_SHA1, 20, 4, 10, 
     98        sec_serv_conf_and_auth}, 
     99 
     100    /* cipher AES_CM_192, auth HMAC_SHA1, auth tag len = 10 octets */ 
     101    //{"AES_CM_192_HMAC_SHA1_80", AES_ICM, 38, HMAC_SHA1, 20, 10, 10, 
     102        //sec_serv_conf_and_auth}, 
     103 
     104    /* cipher AES_CM_192, auth HMAC_SHA1, auth tag len = 4 octets */ 
     105    //{"AES_CM_192_HMAC_SHA1_80", AES_ICM, 38, HMAC_SHA1, 20, 4, 10, 
     106        //sec_serv_conf_and_auth}, 
    90107 
    91108    /* cipher AES_CM, auth HMAC_SHA1, auth tag len = 10 octets */ 
     
    337354    PJ_UNUSED_ARG(endpt); 
    338355 
    339 #if defined(PJMEDIA_EXTERNAL_SRTP) && (PJMEDIA_EXTERNAL_SRTP != 0) 
     356#if !defined(PJMEDIA_SRTP_HAS_DEINIT) && !defined(PJMEDIA_SRTP_HAS_SHUTDOWN) 
     357# define PJMEDIA_SRTP_HAS_SHUTDOWN 1 
     358#endif 
    340359 
    341360# if defined(PJMEDIA_SRTP_HAS_DEINIT) && PJMEDIA_SRTP_HAS_DEINIT!=0 
     
    346365    err = err_status_ok; 
    347366# endif 
    348  
    349 #else 
    350     err = srtp_deinit(); 
    351 #endif 
    352367    if (err != err_status_ok) { 
    353368        PJ_LOG(4, (THIS_FILE, "Failed to deinitialize libsrtp: %s", 
     
    11701185    pj_str_t input; 
    11711186    char *token; 
    1172     pj_size_t token_len; 
    11731187    pj_str_t tmp; 
    11741188    pj_status_t status; 
    1175     int itmp; 
     1189    int itmp, token_len; 
    11761190 
    11771191    pj_bzero(crypto, sizeof(*crypto)); 
Note: See TracChangeset for help on using the changeset viewer.