Skip to content

Commit d6759db

Browse files
sam-githubaddaleax
authored andcommitted
src: remove cast for unsupported openssl
The cast is needed to build against OpenSSL 1.0.2, which master, 11.x, and 10.x no longer support. PR-URL: #26305 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 40a5a93 commit d6759db

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/node_crypto_bio.cc

+1-3
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ namespace crypto {
3939

4040

4141
BIOPointer NodeBIO::New(Environment* env) {
42-
// The const_cast doesn't violate const correctness. OpenSSL's usage of
43-
// BIO_METHOD is effectively const but BIO_new() takes a non-const argument.
44-
BIOPointer bio(BIO_new(const_cast<BIO_METHOD*>(GetMethod())));
42+
BIOPointer bio(BIO_new(GetMethod()));
4543
if (bio && env != nullptr)
4644
NodeBIO::FromBIO(bio.get())->env_ = env;
4745
return bio;

0 commit comments

Comments
 (0)