Ignore:
Timestamp:
Jan 16, 2012 5:05:47 AM (12 years ago)
Author:
nanang
Message:

Close #1014:

  • Added configurable ciphers setting in SIP TLS transport and pjsua app.
  • Added API pj_ssl_cipher_is_supported().
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/1.x/pjsip/include/pjsip/sip_transport_tls.h

    r3553 r3942  
    2727 
    2828#include <pjsip/sip_transport.h> 
     29#include <pj/pool.h> 
    2930#include <pj/ssl_sock.h> 
    3031#include <pj/string.h> 
     
    107108 
    108109    /** 
    109      * TLS cipher list string in OpenSSL format. If empty, then default 
    110      * cipher list of the backend will be used. 
    111      */ 
    112     pj_str_t    ciphers; 
     110     * Number of ciphers contained in the specified cipher preference.  
     111     * If this is set to zero, then default cipher list of the backend  
     112     * will be used. 
     113     * 
     114     * Default: 0 (zero). 
     115     */ 
     116    unsigned ciphers_num; 
     117 
     118    /** 
     119     * Ciphers and order preference. The #pj_ssl_cipher_get_availables() 
     120     * can be used to check the available ciphers supported by backend. 
     121     */ 
     122    pj_ssl_cipher *ciphers; 
    113123 
    114124    /** 
     
    247257    pj_strdup_with_null(pool, &dst->privkey_file, &src->privkey_file); 
    248258    pj_strdup_with_null(pool, &dst->password, &src->password); 
    249     pj_strdup_with_null(pool, &dst->ciphers, &src->ciphers); 
     259    if (src->ciphers_num) { 
     260        unsigned i; 
     261        dst->ciphers = (pj_ssl_cipher*) pj_pool_calloc(pool, src->ciphers_num, 
     262                                                       sizeof(pj_ssl_cipher)); 
     263        for (i=0; i<src->ciphers_num; ++i) 
     264            dst->ciphers[i] = src->ciphers[i]; 
     265    } 
    250266} 
    251267 
Note: See TracChangeset for help on using the changeset viewer.