Fix STARTTLS detection.
The previous code was not an impressive demonstration of clear thinking and could reject cases where STARTTLS was actually supported. Change-Id: I27ce8b401447a49be93f58c9e4eb5c5d8e7b73d4 Reviewed-on: https://boringssl-review.googlesource.com/10241 Reviewed-by: Adam Langley <agl@google.com> Commit-Queue: Adam Langley <agl@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
This commit is contained in:
parent
5a91503826
commit
505cf39af9
@ -535,8 +535,7 @@ bool DoSMTPStartTLS(int sock) {
|
||||
}
|
||||
|
||||
// https://tools.ietf.org/html/rfc1869#section-4.3
|
||||
if (reply_250.find("\nSTARTTLS\n") == std::string::npos &&
|
||||
reply_250.find("\nSTARTTLS") != reply_250.size() - 8) {
|
||||
if (("\n" + reply_250 + "\n").find("\nSTARTTLS\n") == std::string::npos) {
|
||||
fprintf(stderr, "Server does not support STARTTLS\n");
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user