Skip to content

Commit 3b44e5e

Browse files
danbevMylesBorins
authored andcommitted
crypto: return CHECK_OK in VerifyCallback
VerifyCallback returns 1 in two locations but CHECK_CERT_REVOKED in a third return statment. This commit suggests that CHECK_OK is used instead of 1. CHECK_OK is also used as the return value in CheckWhitelistedServerCert so it seems to be consitent change to make. PR-URL: #13241 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent a7b51af commit 3b44e5e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/node_crypto.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2867,14 +2867,14 @@ inline int VerifyCallback(int preverify_ok, X509_STORE_CTX* ctx) {
28672867
// Failure on verification of the cert is handled in
28682868
// Connection::VerifyError.
28692869
if (preverify_ok == 0 || X509_STORE_CTX_get_error(ctx) != X509_V_OK)
2870-
return 1;
2870+
return CHECK_OK;
28712871

28722872
// Server does not need to check the whitelist.
28732873
SSL* ssl = static_cast<SSL*>(
28742874
X509_STORE_CTX_get_ex_data(ctx, SSL_get_ex_data_X509_STORE_CTX_idx()));
28752875

28762876
if (SSL_is_server(ssl))
2877-
return 1;
2877+
return CHECK_OK;
28782878

28792879
// Client needs to check if the server cert is listed in the
28802880
// whitelist when it is issued by the specific rootCAs.

0 commit comments

Comments
 (0)