Skip to content

Commit

Permalink
src: remove cast for unsupported openssl
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
sam-github authored and addaleax committed Mar 1, 2019
1 parent 40a5a93 commit d6759db
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/node_crypto_bio.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ namespace crypto {


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

0 comments on commit d6759db

Please sign in to comment.