From a830ec9a1c5f0e359bac214710f002f29dbd1d76 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Fri, 23 Aug 2019 17:56:09 -0400 Subject: [PATCH] BSecureSocket: Don't continue with an untrusted certificate by default. It has been multiple years since this comment was written; all relevant apps have added their own hooks around this, so we should now be "secure by default." Also spotted by a random Hacker News commenter. --- src/kits/network/libnetapi/SecureSocket.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/kits/network/libnetapi/SecureSocket.cpp b/src/kits/network/libnetapi/SecureSocket.cpp index 99136c742b..4e55e665fb 100644 --- a/src/kits/network/libnetapi/SecureSocket.cpp +++ b/src/kits/network/libnetapi/SecureSocket.cpp @@ -532,10 +532,7 @@ BSecureSocket::InitCheck() bool BSecureSocket::CertificateVerificationFailed(BCertificate&, const char*) { - // Until apps actually make use of the certificate API, let's keep the old - // behavior and accept all connections, even if the certificate validation - // didn't work. - return true; + return false; }