added ssl

This commit is contained in:
Pin
2022-02-17 23:22:30 -05:00
parent 5c60a475e7
commit 1c083b90f8
8 changed files with 300 additions and 25 deletions

View File

@@ -1,3 +1,5 @@
#include <openssl/ssl.h>
int returnRequest(int socket, char *message, int status);
int return200Request(int socket);
int return404Request(int socket);
int return200Request(int socket, SSL *ssl);
int return404Request(int socket, SSL *ssl);

4
include/server.h Normal file
View File

@@ -0,0 +1,4 @@
#include <stdbool.h>
extern bool enableHTTPS;

View File

@@ -1,5 +1,7 @@
#include <stdio.h>
#include <netinet/in.h>
#include <openssl/ssl.h>
int createSocket(int port, int *server_fd, struct sockaddr_in *address, int *addrlen);
int createSecureSocket(int port, int *server_fd, struct sockaddr_in *address, int *addrlen, SSL_CTX **ctx, char certFile[], char keyFile[]);