summaryrefslogtreecommitdiff
path: root/sockets.h
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2019-05-13 00:07:15 +0100
committerLuke Bratch <luke@bratch.co.uk>2019-05-13 00:07:15 +0100
commit216f6a152333b38a8563c570eb237c27585deedb (patch)
tree1d376e9c40dcea8d1ed09213ebe820a8e761ea13 /sockets.h
parent8869477885718844d368b48774f926489385e3b3 (diff)
Implement optional TLS for the server side.
Diffstat (limited to 'sockets.h')
-rw-r--r--sockets.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/sockets.h b/sockets.h
index 099fc53..64cbd44 100644
--- a/sockets.h
+++ b/sockets.h
@@ -30,9 +30,13 @@ void init_openssl();
void cleanup_openssl();
-SSL_CTX *create_context();
+// Create OpenSSL context, type = 0 for IRC server-side (OpenSSL client)
+// or type = 1 for bouncer client-side (OpenSSL server)
+SSL_CTX *create_openssl_context(int type);
-void configure_context(SSL_CTX *ctx, char *certfile, char *keyfile);
+// Configure OpenSSL context, with certfile and keyfile provided if
+// IRC server-side or set to NULL if bouncer client-side
+void configure_openssl_context(SSL_CTX *ctx, char *certfile, char *keyfile);
// Read from a socket, whether or not using TLS
int sockread(SSL *fd, char *buf, int bufsize, int tls);