Skip to content

Commit 550af6d

Browse files
sam-githubMylesBorins
authored andcommitted
src: remove unnecessary call to SSL_get_mode
SSL_set_mode() bit-ORs its argument into the current mode, its not necessary for to do it ourself (though it doesn't cause harm). See: - https://www.openssl.org/docs/man1.1.0/ssl/SSL_set_mode.html - https://github.com/nodejs/node/blob/0ce615c4af/deps/openssl/openssl/ssl/ssl_lib.c#L2176-L2177 PR-URL: #25711 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
1 parent c6a2be2 commit 550af6d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/tls_wrap.cc

+1-2
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ void TLSWrap::InitSSL() {
112112
SSL_set_verify(ssl_.get(), SSL_VERIFY_NONE, crypto::VerifyCallback);
113113

114114
#ifdef SSL_MODE_RELEASE_BUFFERS
115-
long mode = SSL_get_mode(ssl_.get()); // NOLINT(runtime/int)
116-
SSL_set_mode(ssl_.get(), mode | SSL_MODE_RELEASE_BUFFERS);
115+
SSL_set_mode(ssl_.get(), SSL_MODE_RELEASE_BUFFERS);
117116
#endif // SSL_MODE_RELEASE_BUFFERS
118117

119118
SSL_set_app_data(ssl_.get(), this);

0 commit comments

Comments
 (0)