Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
  • Loading branch information
sam-github committed Feb 25, 2019
commit 983ef1887e728482cfb0c8ec63e1b8fd37dd3e4a
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