Ignore:
Timestamp:
Mar 30, 2012 7:10:13 AM (12 years ago)
Author:
bennylp
Message:

Re #1474: Merged all changes from 1.12 - HEAD (from the 1.x branch)

Location:
pjproject/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk

  • pjproject/trunk/pjsip/include/pjsip/sip_transport_tls.h

    r3553 r3999  
    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; 
    113  
    114     /** 
    115      * Optionally specify the server name instance to be contacted when 
    116      * making outgoing TLS connection. This setting is useful when the 
    117      * server is hosting multiple domains for the same TLS listening 
    118      * socket. 
    119      * 
    120      * Default: empty. 
    121      */ 
    122     pj_str_t    server_name; 
     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; 
    123123 
    124124    /** 
     
    247247    pj_strdup_with_null(pool, &dst->privkey_file, &src->privkey_file); 
    248248    pj_strdup_with_null(pool, &dst->password, &src->password); 
    249     pj_strdup_with_null(pool, &dst->ciphers, &src->ciphers); 
     249    if (src->ciphers_num) { 
     250        unsigned i; 
     251        dst->ciphers = (pj_ssl_cipher*) pj_pool_calloc(pool, src->ciphers_num, 
     252                                                       sizeof(pj_ssl_cipher)); 
     253        for (i=0; i<src->ciphers_num; ++i) 
     254            dst->ciphers[i] = src->ciphers[i]; 
     255    } 
    250256} 
    251257 
Note: See TracChangeset for help on using the changeset viewer.