Commit dcb00309 authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Log messages indicating AUTH TLS success or failure and set client prot

Set the client protocol to "FTPS" upon successful TLS startup in the control connection (response to the AUTH TLS command from the client). Log some messages indicating FTPS was attempted or successful.
parent 31d07482
Pipeline #1082 passed with stage
in 16 minutes and 11 seconds
......@@ -1243,6 +1243,7 @@ static void receive_thread(void* arg)
thread_down();
}
// Returns TRUE upon error?!?
static BOOL start_tls(SOCKET *sock, CRYPT_SESSION *sess, BOOL resp)
{
BOOL nodelay;
......@@ -2707,13 +2708,18 @@ static void ctrl_thread(void* arg)
sockprintf(sock,sess,"534 Already in TLS mode");
continue;
}
if (start_tls(&sock, &sess, TRUE))
if (start_tls(&sock, &sess, TRUE)) {
lprintf(LOG_WARNING, "%04d <%s> failed to initialize TLS successfully", sock, host_ip);
break;
}
user.number=0;
sysop=FALSE;
filepos=0;
got_pbsz = FALSE;
protection = FALSE;
lprintf(LOG_INFO, "%04d <%s> initialized TLS successfully", sock, host_ip);
client.protocol = "FTPS";
client_on(sock, &client, /* update: */TRUE);
continue;
}
sockprintf(sock,sess,"504 TLS is the only AUTH supported");
......
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