From 983ef1887e728482cfb0c8ec63e1b8fd37dd3e4a Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Mon, 25 Feb 2019 13:19:11 -0800 Subject: [PATCH] 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. --- src/node_crypto_bio.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/node_crypto_bio.cc b/src/node_crypto_bio.cc index baa90204f2f97a..3d242d9ec454c0 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(GetMethod()))); + BIOPointer bio(BIO_new(GetMethod())); if (bio && env != nullptr) NodeBIO::FromBIO(bio.get())->env_ = env; return bio;