MCPcopy Index your code
hub / github.com/nodejs/node / hasOpenSSL

Function hasOpenSSL

test/common/crypto.js:111–119  ·  view source on GitHub ↗
(major = 0, minor = 0, patch = 0)

Source from the content-addressed store, hash-verified

109
110let OPENSSL_VERSION_NUMBER;
111const hasOpenSSL = (major = 0, minor = 0, patch = 0) => {
112 if (!common.hasCrypto) return false;
113 if (OPENSSL_VERSION_NUMBER === undefined) {
114 const regexp = /(?<m>\d+)\.(?<n>\d+)\.(?<p>\d+)/;
115 const { m, n, p } = process.versions.openssl.match(regexp).groups;
116 OPENSSL_VERSION_NUMBER = opensslVersionNumber(m, n, p);
117 }
118 return OPENSSL_VERSION_NUMBER >= opensslVersionNumber(major, minor, patch);
119};
120
121let opensslCli = null;
122

Calls 2

opensslVersionNumberFunction · 0.85
matchMethod · 0.65

Tested by 1

testFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…