diff options
Diffstat (limited to 'src/node_crypto_bio.cc')
-rw-r--r-- | src/node_crypto_bio.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/node_crypto_bio.cc b/src/node_crypto_bio.cc index 31165b7c98..4a71338edf 100644 --- a/src/node_crypto_bio.cc +++ b/src/node_crypto_bio.cc @@ -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; |