From d3d6cd3ecad19602a894bbe046253ae924d278d4 Mon Sep 17 00:00:00 2001 From: Gireesh Punathil Date: Mon, 24 Sep 2018 04:58:29 -0400 Subject: src: improve SSL version extraction logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The openssl version as defined in ssl libraries is complex. The current logic to extract the major.minor.patch format uses C semantics to loop through the text and search for specific patterns. Use C++ string to tidy it up. PR-URL: https://github.com/nodejs/node/pull/23050 Reviewed-By: Anna Henningsen Reviewed-By: Tobias Nießen Reviewed-By: Colin Ihrig Reviewed-By: Richard Lau Reviewed-By: Refael Ackermann Reviewed-By: Sakthipriyan Vairamani Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Michael Dawson --- src/node_crypto.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/node_crypto.h') diff --git a/src/node_crypto.h b/src/node_crypto.h index 2ca333f3c2..f4afd2fdaf 100644 --- a/src/node_crypto.h +++ b/src/node_crypto.h @@ -93,6 +93,7 @@ extern int VerifyCallback(int preverify_ok, X509_STORE_CTX* ctx); extern void UseExtraCaCerts(const std::string& file); void InitCryptoOnce(); +std::string GetOpenSSLVersion(); class SecureContext : public BaseObject { public: -- cgit v1.2.3