Ignore:
Timestamp:
Mar 15, 2018 3:00:59 AM (7 years ago)
Author:
nanang
Message:

Close #2100:

  • Added new APIs:
    • PJMEDIA: pjmedia_srtp_enum_crypto(), pjmedia_srtp_enum_keying()
    • PJSUA: pjsua_config.srtp_opt, pjsua_acc_config.srtp_opt, pjsua_srtp_opt_default()
    • PJSUA2: AccountMediaConfig::srtpOpt, Endpoint::srtpCryptoEnum()
  • Deprecated PJSUA callback on_create_media_transport_srtp() (not removed yet, just warnings).
  • Slightly refactored SRTP code:
    • Fixed potential issue with on_create_media_transport_srtp(), some PJSUA internal values in pjmedia_srtp_setting may be overridden by app.
    • Fixed few issues in SRTP and keying mechanism, e.g: premature local SDP modification (it should be done after verification).
    • Potential minor backward compatibility issue: default value of pjmedia_srtp_setting.crypto_count is now zero, previously it was initialized with all crypto via pjmedia_srtp_setting_default(), actually zero and all cryptos in this setting semantically are the same.
File:
1 edited

Legend:

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

    r5750 r5755  
    10161016         */ 
    10171017        pjmedia_sdp_media *m_rem = sdp_remote->media[media_index]; 
     1018        pjmedia_sdp_attr *attr_setup; 
    10181019 
    10191020        if (pj_stricmp(&m_rem->desc.transport, &ID_TP_DTLS_SRTP)!=0) { 
     
    10211022            status = PJMEDIA_SRTP_ESDPINTRANSPORT; 
    10221023            goto on_return; 
     1024        } 
     1025 
     1026        /* Check for a=setup in remote SDP. */ 
     1027        attr_setup = pjmedia_sdp_media_find_attr(m_rem, &ID_SETUP, NULL); 
     1028        if (!attr_setup) 
     1029            attr_setup = pjmedia_sdp_attr_find(sdp_remote->attr_count, 
     1030                                      sdp_remote->attr, &ID_SETUP, NULL); 
     1031        switch (ds->srtp->setting.use) { 
     1032            case PJMEDIA_SRTP_DISABLED: 
     1033                if (attr_setup) 
     1034                    return PJMEDIA_SRTP_ESDPINTRANSPORT; 
     1035                break; 
     1036            case PJMEDIA_SRTP_OPTIONAL: 
     1037                break; 
     1038            case PJMEDIA_SRTP_MANDATORY: 
     1039                if (!attr_setup) 
     1040                    return PJMEDIA_SRTP_ESDPINTRANSPORT; 
     1041                break; 
    10231042        } 
    10241043    } 
Note: See TracChangeset for help on using the changeset viewer.