From 8a7f21ccfdb0e0883c6ba951de5c7065a8e263a0 Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Thu, 15 Jan 2015 06:55:02 +0000 Subject: Close #1810: Adding CA path support into SSL socket. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4973 74dad513-b988-da41-8d7b-12977e46ad98 --- pjlib/include/pj/ssl_sock.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'pjlib/include/pj') diff --git a/pjlib/include/pj/ssl_sock.h b/pjlib/include/pj/ssl_sock.h index b2a530b3..2d66b325 100644 --- a/pjlib/include/pj/ssl_sock.h +++ b/pjlib/include/pj/ssl_sock.h @@ -202,6 +202,31 @@ PJ_DECL(pj_status_t) pj_ssl_cert_load_from_files(pj_pool_t *pool, const pj_str_t *privkey_pass, pj_ssl_cert_t **p_cert); +/** + * Create credential from files. + * + * This is the same as pj_ssl_cert_load_from_files() but also + * accepts an additional param CA_path to load CA certificates from + * a directory. + * + * @param CA_file The file of trusted CA list. + * @param CA_path The path to a directory of trusted CA list. + * @param cert_file The file of certificate. + * @param privkey_file The file of private key. + * @param privkey_pass The password of private key, if any. + * @param p_cert Pointer to credential instance to be created. + * + * @return PJ_SUCCESS when successful. + */ +PJ_DECL(pj_status_t) pj_ssl_cert_load_from_files2( + pj_pool_t *pool, + const pj_str_t *CA_file, + const pj_str_t *CA_path, + const pj_str_t *cert_file, + const pj_str_t *privkey_file, + const pj_str_t *privkey_pass, + pj_ssl_cert_t **p_cert); + /** * Dump SSL certificate info. -- cgit v1.2.3