summaryrefslogtreecommitdiff
path: root/pjlib/include
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2015-01-15 06:55:02 +0000
committerNanang Izzuddin <nanang@teluu.com>2015-01-15 06:55:02 +0000
commit8a7f21ccfdb0e0883c6ba951de5c7065a8e263a0 (patch)
treeae65ffab1c0659d3932054e2db33d3eb33195fed /pjlib/include
parent61c0fc6417c175c88155f44183e66c8fbb7652e4 (diff)
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
Diffstat (limited to 'pjlib/include')
-rw-r--r--pjlib/include/pj/ssl_sock.h25
1 files changed, 25 insertions, 0 deletions
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.