Ignore:
Timestamp:
Apr 30, 2014 8:21:28 AM (11 years ago)
Author:
ming
Message:

Fixed #1763: Add pj_ssl_cipher_id() API

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/ssl_sock_symbian.cpp

    r3999 r4829  
    4343static cipher_name_t cipher_names[] = 
    4444{ 
     45    {PJ_TLS_UNKNOWN_CIPHER,                    "UNKNOWN"}, 
    4546    {PJ_TLS_NULL_WITH_NULL_NULL,               "NULL"}, 
    4647 
     
    760761 
    761762 
     763/* Get cipher identifier */ 
     764PJ_DEF(pj_ssl_cipher) pj_ssl_cipher_id(const char *cipher_name) 
     765{ 
     766    unsigned i; 
     767     
     768    if (ciphers_num_ == 0) { 
     769        pj_ssl_cipher c[1]; 
     770        i = 0; 
     771        pj_ssl_cipher_get_availables(c, &i); 
     772    } 
     773     
     774    for (i = 0; i < ciphers_num_; ++i) { 
     775        if (!pj_ansi_stricmp(ciphers_[i].name, cipher_name)) 
     776            return ciphers_[i].id; 
     777    } 
     778 
     779    return PJ_TLS_UNKNOWN_CIPHER; 
     780} 
     781 
     782 
    762783/* Check if the specified cipher is supported by SSL/TLS backend. */ 
    763784PJ_DEF(pj_bool_t) pj_ssl_cipher_is_supported(pj_ssl_cipher cipher) 
Note: See TracChangeset for help on using the changeset viewer.