summaryrefslogtreecommitdiff
path: root/pjlib/include
diff options
context:
space:
mode:
Diffstat (limited to 'pjlib/include')
-rw-r--r--pjlib/include/pj/ssl_sock.h24
-rw-r--r--pjlib/include/pj/types.h3
2 files changed, 26 insertions, 1 deletions
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
@@ -332,16 +332,38 @@ PJ_DECL(pj_status_t) pj_ssl_cipher_get_availables(pj_ssl_cipher ciphers[],
/**
+ * 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.
*/
typedef struct pj_ssl_sock_cb
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);