Ignore:
Timestamp:
Dec 18, 2014 4:40:35 AM (9 years ago)
Author:
riza
Message:

Re #1806: Implement SSL/TLS setting to set protocol operation.

File:
1 edited

Legend:

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

    r4862 r4968  
    488488/**  
    489489 * Enumeration of secure socket protocol types. 
     490 * This can be combined using bitwise OR operation. 
    490491 */ 
    491492typedef enum pj_ssl_sock_proto 
    492493{ 
    493     PJ_SSL_SOCK_PROTO_DEFAULT,      /**< Default protocol of backend.   */ 
    494     PJ_SSL_SOCK_PROTO_TLS1,         /**< TLSv1.0 protocol.              */ 
    495     PJ_SSL_SOCK_PROTO_SSL3,         /**< SSLv3.0 protocol.              */ 
    496     PJ_SSL_SOCK_PROTO_SSL23,        /**< SSLv3.0 but can roll back to  
    497                                          SSLv2.0.                       */ 
    498     PJ_SSL_SOCK_PROTO_SSL2,         /**< SSLv2.0 protocol.              */ 
    499     PJ_SSL_SOCK_PROTO_DTLS1         /**< DTLSv1.0 protocol.             */ 
     494    /** 
     495     * Default protocol of backend.  
     496     */    
     497    PJ_SSL_SOCK_PROTO_DEFAULT = 0, 
     498 
     499    /**  
     500     * SSLv2.0 protocol.           
     501     */ 
     502    PJ_SSL_SOCK_PROTO_SSL2    = (1 << 0), 
     503 
     504    /**  
     505     * SSLv3.0 protocol.           
     506     */ 
     507    PJ_SSL_SOCK_PROTO_SSL3    = (1 << 1), 
     508 
     509    /** 
     510     * TLSv1.0 protocol.           
     511     */ 
     512    PJ_SSL_SOCK_PROTO_TLS1    = (1 << 2), 
     513 
     514    /**  
     515     * TLSv1.1 protocol. 
     516     */ 
     517    PJ_SSL_SOCK_PROTO_TLS1_1  = (1 << 3), 
     518 
     519    /** 
     520     * TLSv1.2 protocol. 
     521     */ 
     522    PJ_SSL_SOCK_PROTO_TLS1_2  = (1 << 4), 
     523 
     524    /**  
     525     * Certain backend implementation e.g:OpenSSL, has feature to enable all 
     526     * protocol.  
     527     */ 
     528    PJ_SSL_SOCK_PROTO_SSL23   = (1 << 16) - 1, 
     529 
     530    /** 
     531     * DTLSv1.0 protocol.          
     532     */ 
     533    PJ_SSL_SOCK_PROTO_DTLS1   = (1 << 16), 
     534 
    500535} pj_ssl_sock_proto; 
    501536 
     
    513548 
    514549    /** 
    515      * Describes secure socket protocol being used. 
    516      */ 
    517     pj_ssl_sock_proto proto; 
     550     * Describes secure socket protocol being used, see #pj_ssl_sock_proto.  
     551     * Use bitwise OR operation to combine the protocol type. 
     552     */ 
     553    pj_uint32_t proto; 
    518554 
    519555    /** 
     
    615651 
    616652    /** 
    617      * Specify security protocol to use, see #pj_ssl_sock_proto. 
     653     * Specify security protocol to use, see #pj_ssl_sock_proto. Use bitwise OR  
     654     * operation to combine the protocol type. 
    618655     * 
    619656     * Default is PJ_SSL_SOCK_PROTO_DEFAULT. 
    620657     */ 
    621     pj_ssl_sock_proto proto; 
     658    pj_uint32_t proto; 
    622659 
    623660    /** 
Note: See TracChangeset for help on using the changeset viewer.