summaryrefslogtreecommitdiffstats
path: root/ssl_backend.h
diff options
context:
space:
mode:
authorAdriaan de Jong <dejong@fox-it.com>2011-06-29 15:30:34 +0200
committerDavid Sommerseth <davids@redhat.com>2011-10-19 22:31:46 +0200
commit6245178696842fb22f2c53d87184236fd471a334 (patch)
treea40bdda0e4296e6dfb428f7566bab23da3e8d302 /ssl_backend.h
parentb64ffdcf09edd7110c1f851942d0e8d4e05d883c (diff)
downloadopenvpn-6245178696842fb22f2c53d87184236fd471a334.tar.gz
openvpn-6245178696842fb22f2c53d87184236fd471a334.tar.xz
openvpn-6245178696842fb22f2c53d87184236fd471a334.zip
Refactored root SSL context initialisation
Signed-off-by: Adriaan de Jong <dejong@fox-it.com> Acked-by: Gert Doering <gert@greenie.muc.de> Acked-by: James Yonan <james@openvpn.net> Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'ssl_backend.h')
-rw-r--r--ssl_backend.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/ssl_backend.h b/ssl_backend.h
index 103eea4..dfa7163 100644
--- a/ssl_backend.h
+++ b/ssl_backend.h
@@ -64,6 +64,36 @@ void tls_free_lib();
*/
void tls_clear_error();
+/**
+ * Initialise a library-specific TLS context for a server.
+ *
+ * @param ctx TLS context to initialise
+ */
+void tls_ctx_server_new(struct tls_root_ctx *ctx);
+
+/**
+ * Initialises a library-specific TLS context for a client.
+ *
+ * @param ctx TLS context to initialise
+ */
+void tls_ctx_client_new(struct tls_root_ctx *ctx);
+
+/**
+ * Frees the library-specific TLSv1 context
+ *
+ * @param ctx TLS context to free
+ */
+void tls_ctx_free(struct tls_root_ctx *ctx);
+
+/**
+ * Checks whether the given TLS context is initialised
+ *
+ * @param ctx TLS context to check
+ *
+ * @return true if the context is initialised, false if not.
+ */
+bool tls_ctx_initialised(struct tls_root_ctx *ctx);
+
/*
* Show the TLS ciphers that are available for us to use in the OpenSSL
* library.