Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup! test: check against run-time OpenSSL version
  • Loading branch information
richardlau committed Jun 15, 2024
commit 3f6907929619270dcbeaea09d2ed03a9c11e0f21
21 changes: 12 additions & 9 deletions test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,6 @@ const hasOpenSSL = (major = 0, minor = 0, patch = 0) => {
return OPENSSL_VERSION_NUMBER >= opensslVersionNumber(major, minor, patch);
};

const hasOpenSSL3 = hasOpenSSL(3);

const hasOpenSSL31 = hasOpenSSL(3, 1);

const hasOpenSSL32 = hasOpenSSL(3, 2);

const hasQuic = hasCrypto && !!process.config.variables.openssl_quic;

function parseTestFlags(filename = process.argv[1]) {
Expand Down Expand Up @@ -986,9 +980,6 @@ const common = {
hasIntl,
hasCrypto,
hasOpenSSL,
hasOpenSSL3,
hasOpenSSL31,
hasOpenSSL32,
hasQuic,
hasMultiLocalhost,
invalidArgTypeHelper,
Expand Down Expand Up @@ -1049,6 +1040,18 @@ const common = {
});
},

get hasOpenSSL3() {
return hasOpenSSL(3);
},

get hasOpenSSL31() {
return hasOpenSSL(3, 1);
},

get hasOpenSSL32() {
return hasOpenSSL(3, 2);
},

get inFreeBSDJail() {
if (inFreeBSDJail !== null) return inFreeBSDJail;

Expand Down