Ignore:
Timestamp:
Mar 15, 2018 3:00:59 AM (6 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/include/pjmedia/transport_srtp.h

    r5621 r5755  
    191191 
    192192    /** 
    193      * Specify the number of crypto suite settings. 
     193     * Specify the number of crypto suite settings. If set to zero, all 
     194     * available cryptos will be enabled. Default: zero. 
    194195     */ 
    195196    unsigned                     crypto_count; 
    196197 
    197198    /** 
    198      * Specify individual crypto suite setting. 
     199     * Specify individual crypto suite setting and its priority order. 
     200     * 
    199201     * Notes for DTLS-SRTP keying: 
    200202     *  - Currently only supports these cryptos: AES_CM_128_HMAC_SHA1_80, 
     
    205207 
    206208    /** 
    207      * Specify the number of enabled keying methods. 
    208      * Default is PJMEDIA_SRTP_MAX_KEYINGS (all enabled). 
     209     * Specify the number of enabled keying methods. If set to zero, all 
     210     * keyings will be enabled. Maximum value is PJMEDIA_SRTP_MAX_KEYINGS. 
     211     * 
     212     * Default is zero (all keyings are enabled with priority order: 
     213     * SDES, DTLS-SRTP). 
    209214     */ 
    210215    unsigned                     keying_count; 
     
    215220     * for example as currently only one keying is supported in the SDP offer, 
    216221     * keying with first priority will be likely used in the SDP offer. 
    217      * 
    218      * Default is that all supported keying methods (i.e: currently SDES and 
    219      * DTLS-SRTP) will be enabled and with priority order: SDES, DTLS-SRTP. 
    220222     */ 
    221223    pjmedia_srtp_keying_method   keying[PJMEDIA_SRTP_KEYINGS_COUNT]; 
     
    321323 */ 
    322324PJ_DECL(void) pjmedia_srtp_setting_default(pjmedia_srtp_setting *opt); 
     325 
     326 
     327/** 
     328 * Enumerate available SRTP crypto name. 
     329 * 
     330 * @param count     On input, specifies the maximum length of crypto 
     331 *                  array. On output, the number of available crypto 
     332 *                  initialized by this function. 
     333 * @param crypto    The SRTP crypto array output. 
     334 * 
     335 * @return          PJ_SUCCESS on success. 
     336 */ 
     337PJ_DECL(pj_status_t) pjmedia_srtp_enum_crypto(unsigned *count, 
     338                                              pjmedia_srtp_crypto crypto[]); 
     339 
     340 
     341/** 
     342 * Enumerate available SRTP keying methods. 
     343 * 
     344 * @param count     On input, specifies the maximum length of keying method 
     345 *                  array. On output, the number of available keying method 
     346 *                  initialized by this function. 
     347 * @param crypto    The SRTP keying method array output. 
     348 * 
     349 * @return          PJ_SUCCESS on success. 
     350 */ 
     351PJ_DECL(pj_status_t) pjmedia_srtp_enum_keying(unsigned *count, 
     352                                      pjmedia_srtp_keying_method keying[]); 
    323353 
    324354 
Note: See TracChangeset for help on using the changeset viewer.