m_starttls: reject "STARTTLS" use over an existing TLS connection
This commit is contained in:
parent
f8d9a4c289
commit
2b17787939
1 changed files with 6 additions and 0 deletions
|
@ -53,6 +53,12 @@ mr_starttls(struct Client *client_p, struct Client *source_p, int parc, const ch
|
||||||
if (!MyConnect(client_p))
|
if (!MyConnect(client_p))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (IsSSL(client_p))
|
||||||
|
{
|
||||||
|
sendto_one_numeric(client_p, ERR_STARTTLS, form_str(ERR_STARTTLS), "Nested TLS handshake not allowed");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (!ssl_ok || !get_ssld_count())
|
if (!ssl_ok || !get_ssld_count())
|
||||||
{
|
{
|
||||||
sendto_one_numeric(client_p, ERR_STARTTLS, form_str(ERR_STARTTLS), "TLS is not configured");
|
sendto_one_numeric(client_p, ERR_STARTTLS, form_str(ERR_STARTTLS), "TLS is not configured");
|
||||||
|
|
Loading…
Reference in a new issue