Skip to content
Snippets Groups Projects
Commit dcb00309 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
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
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #1082 passed
......@@ -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");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment