Changeset 5781
- Timestamp:
- Apr 17, 2018 10:52:33 AM (7 years ago)
- Location:
- pjproject/trunk/pjmedia/src/pjmedia
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/transport_srtp.c
r5773 r5781 682 682 PJ_ASSERT_RETURN(endpt && tp && p_tp, PJ_EINVAL); 683 683 684 /* Check crypto availability */685 if (opt && opt->crypto_count == 0 &&686 opt->use == PJMEDIA_SRTP_MANDATORY)687 return PJMEDIA_SRTP_ESDPREQCRYPTO;688 689 684 /* Check crypto */ 690 685 if (opt && opt->use != PJMEDIA_SRTP_DISABLED) { … … 740 735 * i.e: all available crypto but 'NULL'. 741 736 */ 742 if (srtp->setting.crypto_count == 0) { 737 if (srtp->setting.crypto_count == 0 && opt->use != PJMEDIA_SRTP_DISABLED) 738 { 743 739 srtp->setting.crypto_count = PJMEDIA_SRTP_MAX_CRYPTOS; 744 740 pjmedia_srtp_enum_crypto(&srtp->setting.crypto_count, … … 1115 1111 /* Save the callbacks */ 1116 1112 pj_lock_acquire(srtp->mutex); 1117 srtp->rtp_cb = param->rtp_cb; 1118 srtp->rtp_cb2 = param->rtp_cb2; 1119 srtp->rtcp_cb = param->rtcp_cb; 1120 srtp->user_data = param->user_data; 1113 if (param->rtp_cb || param->rtp_cb2) { 1114 /* Do not update rtp_cb if not set, as attach() is called by 1115 * keying method. 1116 */ 1117 srtp->rtp_cb = param->rtp_cb; 1118 srtp->rtp_cb2 = param->rtp_cb2; 1119 srtp->rtcp_cb = param->rtcp_cb; 1120 srtp->user_data = param->user_data; 1121 } 1121 1122 pj_lock_release(srtp->mutex); 1122 1123 -
pjproject/trunk/pjmedia/src/pjmedia/transport_srtp_dtls.c
r5780 r5781 357 357 "SRTP_AES128_CM_SHA1_80", 358 358 "SRTP_AES128_CM_SHA1_32", 359 "SRTP_AEAD_AES_256_GCM" 360 "SRTP_AEAD_AES_128_GCM" ,359 "SRTP_AEAD_AES_256_GCM", 360 "SRTP_AEAD_AES_128_GCM" 361 361 }; 362 362 static char* pj_profiles[] = … … 364 364 "AES_CM_128_HMAC_SHA1_80", 365 365 "AES_CM_128_HMAC_SHA1_32", 366 "AEAD_AES_256_GCM" 367 "AEAD_AES_128_GCM" ,366 "AEAD_AES_256_GCM", 367 "AEAD_AES_128_GCM" 368 368 }; 369 369 … … 473 473 static pj_status_t ssl_get_srtp_material(dtls_srtp *ds) 474 474 { 475 unsigned char material[SRTP_MAX_KEY_LEN ];475 unsigned char material[SRTP_MAX_KEY_LEN * 2]; 476 476 SRTP_PROTECTION_PROFILE *profile; 477 477 int rc, i, crypto_idx = -1;
Note: See TracChangeset
for help on using the changeset viewer.