| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 815d71b commit a0879ad
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -22,7 +22,7 @@ | |||
| 22 | 22 | #endif // NODE_BUNDLED_ZLIB | |
| 23 | 23 | ||
| 24 | 24 | #if HAVE_OPENSSL | |
| 25 | - #include <openssl/opensslv.h> | ||
| 25 | + #include <openssl/crypto.h> | ||
| 26 | 26 | #if NODE_OPENSSL_HAS_QUIC | |
| 27 | 27 | #include <openssl/quic.h> | |
| 28 | 28 | #endif | |
@@ -54,9 +54,10 @@ static constexpr size_t search(const char* s, char c, size_t n = 0) { | |||
| 54 | 54 | static inline std::string GetOpenSSLVersion() { | |
| 55 | 55 | // sample openssl version string format | |
| 56 | 56 | // for reference: "OpenSSL 1.1.0i 14 Aug 2018" | |
| 57 | - constexpr size_t start = search(OPENSSL_VERSION_TEXT, ' ') + 1; | ||
| 58 | - constexpr size_t len = search(&OPENSSL_VERSION_TEXT[start], ' '); | ||
| 59 | - return std::string(OPENSSL_VERSION_TEXT, start, len); | ||
| 57 | + const char* version = OpenSSL_version(OPENSSL_VERSION); | ||
| 58 | + const size_t start = search(version, ' ') + 1; | ||
| 59 | + const size_t len = search(&version[start], ' '); | ||
| 60 | + return std::string(version, start, len); | ||
| 60 | 61 | } | |
| 61 | 62 | #endif // HAVE_OPENSSL | |
| 62 | 63 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments