Commit 6fee1956 authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Detect TLS startup errors correct/fully

We can't (apparently) only rely on the return value of start_tls(), we have to check the value of the crypt session too.
This fix the possibility of this happening:
Jun  7 18:07:26 sbbs synchronet: ftp  0058 TLS ERROR 'No perform this operation' (-21) opening keyset
Jun  7 18:07:26 sbbs synchronet: ftp  0058 <> initialized TLS successfully

Instead, we'll detect the failure and disable FTPS support, logging "failed to initialize TLS successfully".
parent 2106e629
......@@ -2581,7 +2581,7 @@ static void ctrl_thread(void* arg)
sockprintf(sock,sess,"534 Already in TLS mode");
if (start_tls(&sock, &sess, TRUE)) {
if (start_tls(&sock, &sess, TRUE) || sess == -1) {
lprintf(LOG_WARNING, "%04d <%s> failed to initialize TLS successfully", sock, host_ip);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment