Changeset 5076 for pjproject


Ignore:
Timestamp:
Apr 23, 2015 2:42:49 AM (9 years ago)
Author:
ming
Message:

Fixed #1845: Add support if OpenSSL library has more than 100 cipher suites

Location:
pjproject/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/include/pj/config.h

    r5064 r5076  
    862862#ifndef PJ_HAS_SSL_SOCK 
    863863#  define PJ_HAS_SSL_SOCK           0 
     864#endif 
     865 
     866 
     867/** 
     868 * Define the maximum number of ciphers supported by the secure socket. 
     869 * 
     870 * Default: 256 
     871 */ 
     872#ifndef PJ_SSL_SOCK_MAX_CIPHERS 
     873#  define PJ_SSL_SOCK_MAX_CIPHERS   256 
    864874#endif 
    865875 
  • pjproject/trunk/pjlib/src/pj/ssl_sock_ossl.c

    r5074 r5076  
    4040#define DELAYED_CLOSE_TIMEOUT   200 
    4141 
    42 /* Maximum ciphers */ 
    43 #define MAX_CIPHERS             100 
    44  
    4542/*  
    4643 * Include OpenSSL headers  
     
    297294    pj_ssl_cipher    id; 
    298295    const char      *name; 
    299 } openssl_ciphers[MAX_CIPHERS]; 
     296} openssl_ciphers[PJ_SSL_SOCK_MAX_CIPHERS]; 
    300297 
    301298/* OpenSSL application data index */ 
     
    346343 
    347344        ctx=SSL_CTX_new(meth); 
    348         SSL_CTX_set_cipher_list(ctx, "ALL"); 
     345        SSL_CTX_set_cipher_list(ctx, "ALL:COMPLEMENTOFALL"); 
    349346 
    350347        ssl = SSL_new(ctx); 
     
    793790 
    794791    /* Set SSL with ALL available ciphers */ 
    795     SSL_set_cipher_list(ssock->ossl_ssl, "ALL"); 
     792    SSL_set_cipher_list(ssock->ossl_ssl, "ALL:COMPLEMENTOFALL"); 
    796793 
    797794    /* Generate user specified cipher list in OpenSSL format */ 
  • pjproject/trunk/pjlib/src/pjlib-test/ssl_sock.c

    r4537 r5076  
    4141static int get_cipher_list(void) { 
    4242    pj_status_t status; 
    43     pj_ssl_cipher ciphers[100]; 
     43    pj_ssl_cipher ciphers[PJ_SSL_SOCK_MAX_CIPHERS]; 
    4444    unsigned cipher_num; 
    4545    unsigned i; 
  • pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app_config.c

    r5065 r5076  
    12171217 
    12181218                if (pj_ssl_cipher_is_supported(cipher)) { 
    1219                     static pj_ssl_cipher tls_ciphers[128]; 
     1219                    static pj_ssl_cipher tls_ciphers[PJ_SSL_SOCK_MAX_CIPHERS]; 
    12201220 
    12211221                    tls_ciphers[cfg->udp_cfg.tls_setting.ciphers_num++] = cipher; 
    12221222                    cfg->udp_cfg.tls_setting.ciphers = tls_ciphers; 
    12231223                } else { 
    1224                     pj_ssl_cipher ciphers[128]; 
     1224                    pj_ssl_cipher ciphers[512]; 
    12251225                    unsigned j, ciphers_cnt; 
    12261226 
  • pjproject/trunk/pjsip/src/pjsua2/endpoint.cpp

    r4887 r5076  
    14531453{ 
    14541454#if PJ_HAS_SSL_SOCK 
    1455     pj_ssl_cipher ciphers[64]; 
     1455    pj_ssl_cipher ciphers[PJ_SSL_SOCK_MAX_CIPHERS]; 
    14561456    unsigned count = PJ_ARRAY_SIZE(ciphers); 
    14571457 
Note: See TracChangeset for help on using the changeset viewer.