- Timestamp:
- Aug 15, 2016 7:32:29 AM (8 years ago)
- Location:
- pjproject/trunk/pjmedia
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/include/pjmedia/config.h
r5412 r5418 973 973 974 974 /** 975 * Enable AES_CM_192 cryptos in SRTP 975 * Enable AES_CM_192 cryptos in SRTP. 976 * It was reported that this crypto only works among libsrtp backends, 977 * so we recommend to disable this. 978 * 979 * To enable this, you would require OpenSSL which supports it. 980 * See https://trac.pjsip.org/repos/ticket/1943 for more info. 981 * 976 982 * Default: disabled. 977 983 */ … … 992 998 /** 993 999 * Enable AES_GCM_256 cryptos in SRTP. 1000 * 1001 * To enable this, you would require OpenSSL which supports it. 1002 * See https://trac.pjsip.org/repos/ticket/1943 for more info. 1003 * 994 1004 * Default: disabled. 995 1005 */ … … 1001 1011 /** 1002 1012 * Enable AES_GCM_128 cryptos in SRTP. 1013 * 1014 * To enable this, you would require OpenSSL which supports it. 1015 * See https://trac.pjsip.org/repos/ticket/1943 for more info. 1016 * 1003 1017 * Default: disabled. 1004 1018 */ -
pjproject/trunk/pjmedia/src/pjmedia/transport_srtp.c
r5412 r5418 73 73 static const pj_str_t ID_CRYPTO = { "crypto", 6 }; 74 74 75 typedef void (*crypto_method_t)(crypto_policy_t *policy); 76 75 77 typedef struct crypto_suite 76 78 { … … 83 85 unsigned srtcp_auth_tag_len; 84 86 sec_serv_t service; 87 /* This is an attempt to validate crypto support by libsrtp, i.e: it should 88 * raise linking error if the libsrtp does not support the crypto. 89 */ 90 cipher_type_t *ext_cipher_type; 91 crypto_method_t ext_crypto_method; 85 92 } crypto_suite; 93 94 extern cipher_type_t aes_gcm_256_openssl; 95 extern cipher_type_t aes_gcm_128_openssl; 96 extern cipher_type_t aes_icm_192; 86 97 87 98 /* https://www.iana.org/assignments/sdp-security-descriptions/sdp-security-descriptions.xhtml */ … … 93 104 /* cipher AES_GCM, NULL auth, auth tag len = 16 octets */ 94 105 {"AEAD_AES_256_GCM", AES_256_GCM, AES_256_GCM_KEYSIZE_WSALT, 95 NULL_AUTH, 0, 16, 16, sec_serv_conf_and_auth },106 NULL_AUTH, 0, 16, 16, sec_serv_conf_and_auth, &aes_gcm_256_openssl}, 96 107 /* cipher AES_GCM, NULL auth, auth tag len = 8 octets */ 97 108 {"AEAD_AES_256_GCM_8", AES_256_GCM, AES_256_GCM_KEYSIZE_WSALT, 98 NULL_AUTH, 0, 8, 8, sec_serv_conf_and_auth },109 NULL_AUTH, 0, 8, 8, sec_serv_conf_and_auth, &aes_gcm_256_openssl}, 99 110 #endif 100 111 #if defined(PJMEDIA_SRTP_HAS_AES_CM_256) && \ … … 102 113 /* cipher AES_CM_256, auth HMAC_SHA1, auth tag len = 10 octets */ 103 114 {"AES_256_CM_HMAC_SHA1_80", AES_ICM, 46, HMAC_SHA1, 20, 10, 10, 104 sec_serv_conf_and_auth}, 115 sec_serv_conf_and_auth, NULL, 116 &crypto_policy_set_aes_cm_256_hmac_sha1_80}, 105 117 /* cipher AES_CM_256, auth HMAC_SHA1, auth tag len = 10 octets */ 106 118 {"AES_256_CM_HMAC_SHA1_32", AES_ICM, 46, HMAC_SHA1, 20, 4, 10, 107 sec_serv_conf_and_auth}, 119 sec_serv_conf_and_auth, NULL, 120 &crypto_policy_set_aes_cm_256_hmac_sha1_32}, 108 121 #endif 109 122 #if defined(PJMEDIA_SRTP_HAS_AES_CM_192) && \ … … 111 124 /* cipher AES_CM_192, auth HMAC_SHA1, auth tag len = 10 octets */ 112 125 {"AES_192_CM_HMAC_SHA1_80", AES_ICM, 38, HMAC_SHA1, 20, 10, 10, 113 sec_serv_conf_and_auth },126 sec_serv_conf_and_auth, &aes_icm_192}, 114 127 /* cipher AES_CM_192, auth HMAC_SHA1, auth tag len = 4 octets */ 115 128 {"AES_192_CM_HMAC_SHA1_32", AES_ICM, 38, HMAC_SHA1, 20, 4, 10, 116 sec_serv_conf_and_auth },129 sec_serv_conf_and_auth, &aes_icm_192}, 117 130 #endif 118 131 #if defined(PJMEDIA_SRTP_HAS_AES_GCM_128) && \ … … 120 133 /* cipher AES_GCM, NULL auth, auth tag len = 16 octets */ 121 134 {"AEAD_AES_128_GCM", AES_128_GCM, AES_128_GCM_KEYSIZE_WSALT, 122 NULL_AUTH, 0, 16, 16, sec_serv_conf_and_auth },135 NULL_AUTH, 0, 16, 16, sec_serv_conf_and_auth, &aes_gcm_128_openssl}, 123 136 124 137 /* cipher AES_GCM, NULL auth, auth tag len = 8 octets */ 125 138 {"AEAD_AES_128_GCM_8", AES_128_GCM, AES_128_GCM_KEYSIZE_WSALT, 126 NULL_AUTH, 0, 8, 8, sec_serv_conf_and_auth },139 NULL_AUTH, 0, 8, 8, sec_serv_conf_and_auth, &aes_gcm_128_openssl}, 127 140 #endif 128 141 #if defined(PJMEDIA_SRTP_HAS_AES_CM_128) && \
Note: See TracChangeset
for help on using the changeset viewer.