diff options
author | Benny Prijono <bennylp@teluu.com> | 2012-03-30 07:10:13 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2012-03-30 07:10:13 +0000 |
commit | 6b4964727bffb379aca9601e1cf69051ccbf600c (patch) | |
tree | 1d9739ea8b3b5e0421f1d99b39e798b1514fb644 /pjsip/include/pjsip/sip_transport_tls.h | |
parent | 85ac546acb235df62169c4ad317da74a62e56a88 (diff) |
Re #1474: Merged all changes from 1.12 - HEAD (from the 1.x branch)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3999 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include/pjsip/sip_transport_tls.h')
-rw-r--r-- | pjsip/include/pjsip/sip_transport_tls.h | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/pjsip/include/pjsip/sip_transport_tls.h b/pjsip/include/pjsip/sip_transport_tls.h index f9426412..ae823f36 100644 --- a/pjsip/include/pjsip/sip_transport_tls.h +++ b/pjsip/include/pjsip/sip_transport_tls.h @@ -26,6 +26,7 @@ */ #include <pjsip/sip_transport.h> +#include <pj/pool.h> #include <pj/ssl_sock.h> #include <pj/string.h> #include <pj/sock_qos.h> @@ -106,20 +107,19 @@ typedef struct pjsip_tls_setting int method; /** - * TLS cipher list string in OpenSSL format. If empty, then default - * cipher list of the backend will be used. + * Number of ciphers contained in the specified cipher preference. + * If this is set to zero, then default cipher list of the backend + * will be used. + * + * Default: 0 (zero). */ - pj_str_t ciphers; + unsigned ciphers_num; /** - * Optionally specify the server name instance to be contacted when - * making outgoing TLS connection. This setting is useful when the - * server is hosting multiple domains for the same TLS listening - * socket. - * - * Default: empty. + * Ciphers and order preference. The #pj_ssl_cipher_get_availables() + * can be used to check the available ciphers supported by backend. */ - pj_str_t server_name; + pj_ssl_cipher *ciphers; /** * Specifies TLS transport behavior on the server TLS certificate @@ -246,7 +246,13 @@ PJ_INLINE(void) pjsip_tls_setting_copy(pj_pool_t *pool, pj_strdup_with_null(pool, &dst->cert_file, &src->cert_file); pj_strdup_with_null(pool, &dst->privkey_file, &src->privkey_file); pj_strdup_with_null(pool, &dst->password, &src->password); - pj_strdup_with_null(pool, &dst->ciphers, &src->ciphers); + if (src->ciphers_num) { + unsigned i; + dst->ciphers = (pj_ssl_cipher*) pj_pool_calloc(pool, src->ciphers_num, + sizeof(pj_ssl_cipher)); + for (i=0; i<src->ciphers_num; ++i) + dst->ciphers[i] = src->ciphers[i]; + } } |