summaryrefslogtreecommitdiff
path: root/sockets.h
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2019-05-12 00:42:57 +0100
committerLuke Bratch <luke@bratch.co.uk>2019-05-12 00:42:57 +0100
commit01c0e36bb3f6c8345d4a94b157b68a0c0f4c85cf (patch)
tree6d71e15784e052380de8747430e5fb0702db73aa /sockets.h
parent34d410dc82e05f4255ec23a9deaff212b7903955 (diff)
Implement TLS using OpenSSL.
Diffstat (limited to 'sockets.h')
-rw-r--r--sockets.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sockets.h b/sockets.h
index 3c8fcbf..08ca457 100644
--- a/sockets.h
+++ b/sockets.h
@@ -12,6 +12,8 @@
#include <sys/socket.h>
#include <arpa/inet.h>
#include <sys/select.h>
+#include <openssl/ssl.h>
+#include <openssl/err.h>
#define BACKLOG 10 // maximum length to which the queue of pending connections for sockfd may grow
@@ -26,4 +28,12 @@ int createserversocket(char *host, char *port);
// Create listening socket to listen for bouncer client connections
int createclientsocket(char *listenport);
+void init_openssl();
+
+void cleanup_openssl();
+
+SSL_CTX *create_context();
+
+void configure_context(SSL_CTX *ctx);
+
#endif