From 6b4964727bffb379aca9601e1cf69051ccbf600c Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Fri, 30 Mar 2012 07:10:13 +0000 Subject: 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 --- pjlib/include/pj/ssl_sock.h | 24 +++++++++++++++++++++++- pjlib/include/pj/types.h | 3 +++ 2 files changed, 26 insertions(+), 1 deletion(-) (limited to 'pjlib/include/pj') diff --git a/pjlib/include/pj/ssl_sock.h b/pjlib/include/pj/ssl_sock.h index faf82f5e..0e8fb4a4 100644 --- a/pjlib/include/pj/ssl_sock.h +++ b/pjlib/include/pj/ssl_sock.h @@ -331,16 +331,38 @@ PJ_DECL(pj_status_t) pj_ssl_cipher_get_availables(pj_ssl_cipher ciphers[], unsigned *cipher_num); +/** + * Check if the specified cipher is supported by SSL/TLS backend. + * + * @param cipher The cipher. + * + * @return PJ_TRUE when supported. + */ +PJ_DECL(pj_bool_t) pj_ssl_cipher_is_supported(pj_ssl_cipher cipher); + + /** * Get cipher name string. * * @param cipher The cipher. * - * @return The cipher name or NULL if cipher is not recognized. + * @return The cipher name or NULL if cipher is not recognized/ + * supported. */ PJ_DECL(const char*) pj_ssl_cipher_name(pj_ssl_cipher cipher); +/** + * Get cipher ID from cipher name string. + * + * @param cipher_name The cipher name string. + * + * @return The cipher ID or PJ_TLS_UNKNOWN_CIPHER if the cipher + * name string is not recognized/supported. + */ +PJ_DECL(pj_ssl_cipher) pj_ssl_cipher_id(const char *cipher_name); + + /** * This structure contains the callbacks to be called by the secure socket. */ diff --git a/pjlib/include/pj/types.h b/pjlib/include/pj/types.h index 31ba46dc..1e434dd3 100644 --- a/pjlib/include/pj/types.h +++ b/pjlib/include/pj/types.h @@ -290,6 +290,9 @@ typedef int pj_exception_id_t; * in random string generation, and to initialize operating system dependent * functionality (such as WSAStartup() in Windows). * + * Apart from calling pj_init(), application typically should also initialize + * the random seed by calling pj_srand(). + * * @return PJ_SUCCESS on success. */ PJ_DECL(pj_status_t) pj_init(void); -- cgit v1.2.3