| If we are not serving TLS, shutdown the connection if someone tries TLS. - geom… | |
| git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfri… | |
| Log | |
| Files | |
| Refs | |
| Tags | |
| README | |
| LICENSE | |
| --- | |
| commit 91ac958ffd895f773c056c5a5a0301c64e6db50c | |
| parent 2f68d11cbcca3d8d0a6d6488de48bca802c3090d | |
| Author: Christoph Lohmann <[email protected]> | |
| Date: Sun, 15 Nov 2020 13:56:18 +0100 | |
| If we are not serving TLS, shutdown the connection if someone tries TLS. | |
| Diffstat: | |
| M main.c | 5 ++--- | |
| 1 file changed, 2 insertions(+), 3 deletions(-) | |
| --- | |
| diff --git a/main.c b/main.c | |
| @@ -780,12 +780,12 @@ main(int argc, char *argv[]) | |
| if (tls_handshake(tlsclientctx) < 0) | |
| return 1; | |
| } | |
| -#else /* ENABLE_TLS */ | |
| +#endif /* ENABLE_TLS */ | |
| /* | |
| * Some TLS request. Help them determine we only | |
| * serve plaintext. | |
| */ | |
| - if (byte0 == 0x16) { | |
| + if (byte0 == 0x16 && !dotls) { | |
| if (loglvl & CONN) { | |
| logentry(clienth, clientp, "-", | |
| "disconnected"); | |
| @@ -796,7 +796,6 @@ main(int argc, char *argv[]) | |
| return 1; | |
| } | |
| -#endif /* ENABLE_TLS */ | |
| maxrecv = sizeof(recvb) - 1; | |
| do { |