diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/config.h | 2 | ||||
| -rw-r--r-- | include/server.h | 10 | ||||
| -rw-r--r-- | include/tls.h | 2 |
3 files changed, 10 insertions, 4 deletions
diff --git a/include/config.h b/include/config.h index 495db3a..83253f7 100644 --- a/include/config.h +++ b/include/config.h @@ -7,12 +7,12 @@ struct gmnisrv_tls { char *store; char *organization; char *email; + SSL_CTX *ssl_ctx; }; struct gmnisrv_host { char *hostname; char *root; - SSL_CTX *ssl_ctx; X509 *x509; EVP_PKEY *pkey; struct gmnisrv_host *next; diff --git a/include/server.h b/include/server.h index ac3bcac..5624b52 100644 --- a/include/server.h +++ b/include/server.h @@ -1,5 +1,6 @@ #ifndef GMNISRV_SERVER #define GMNISRV_SERVER +#include <openssl/ssl.h> #include <poll.h> #include <stdbool.h> @@ -8,11 +9,14 @@ struct gmnisrv_client { struct sockaddr addr; socklen_t addrlen; + int sockfd; - char buf[GEMINI_MAX_URL + 2]; - size_t bufln; + SSL *ssl; + BIO *bio; - int sockfd; + char buf[GEMINI_MAX_URL + 3]; + + struct gmnisrv_host *host; }; struct gmisrv_config; diff --git a/include/tls.h b/include/tls.h index bc088ef..06d1123 100644 --- a/include/tls.h +++ b/include/tls.h @@ -4,5 +4,7 @@ struct gmnisrv_config; int gmnisrv_tls_init(struct gmnisrv_config *conf); +SSL *gmnisrv_tls_get_ssl(struct gmnisrv_config *conf, int fd); +void gmnisrv_tls_set_host(SSL *ssl, struct gmnisrv_host *host); #endif |
