fix(curl): revert to use openssl on macos [INS-3445] (#6981)

This commit is contained in:
Jay Wu 2024-01-11 17:55:47 +08:00 committed by GitHub
parent 20491d9728
commit b2e390f707
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 11 deletions

10
package-lock.json generated
View File

@ -2028,9 +2028,9 @@
}
},
"node_modules/@getinsomnia/node-libcurl": {
"version": "2.4.1-5",
"resolved": "https://registry.npmjs.org/@getinsomnia/node-libcurl/-/node-libcurl-2.4.1-5.tgz",
"integrity": "sha512-QI9cufADALZtoAPPj9G4X1hzZLCdcP1wxQbL4niY86cNhFpennhiE+WL1qqD5DSBuXa+0xWeOG+LBn36PfE0CA==",
"version": "2.4.1-9",
"resolved": "https://registry.npmjs.org/@getinsomnia/node-libcurl/-/node-libcurl-2.4.1-9.tgz",
"integrity": "sha512-8UBi9HQXQXeCzv+SyWQTO/bwEQLBSOrdcmDNftLtOsdCBvRy9ftKopOAx+DliDWAaBk2kWdeuCOZ9gsMns08/g==",
"hasInstallScript": true,
"dependencies": {
"@mapbox/node-pre-gyp": "1.0.5",
@ -25350,7 +25350,7 @@
"dependencies": {
"@apideck/better-ajv-errors": "^0.3.6",
"@apidevtools/swagger-parser": "10.1.0",
"@getinsomnia/node-libcurl": "^2.4.1-5",
"@getinsomnia/node-libcurl": "^2.4.1-9",
"@grpc/grpc-js": "^1.8.17",
"@grpc/proto-loader": "^0.7.7",
"@jest/globals": "^28.1.0",
@ -25686,7 +25686,7 @@
"version": "8.5.1",
"license": "Apache-2.0",
"dependencies": {
"@getinsomnia/node-libcurl": "^2.4.1-5",
"@getinsomnia/node-libcurl": "^2.4.1-9",
"@seald-io/nedb": "^4.0.3",
"@segment/analytics-node": "1.0.0",
"@stoplight/spectral-core": "^1.18.2",

View File

@ -7,7 +7,7 @@
"main": "dist/index.js",
"types": "dist/send-request/index.d.ts",
"dependencies": {
"@getinsomnia/node-libcurl": "^2.4.1-5",
"@getinsomnia/node-libcurl": "^2.4.1-9",
"@segment/analytics-node": "1.0.0",
"@stoplight/spectral-core": "^1.18.2",
"@stoplight/spectral-formats": "^1.5.0",

View File

@ -36,7 +36,7 @@
"dependencies": {
"@apideck/better-ajv-errors": "^0.3.6",
"@apidevtools/swagger-parser": "10.1.0",
"@getinsomnia/node-libcurl": "^2.4.1-5",
"@getinsomnia/node-libcurl": "^2.4.1-9",
"@grpc/grpc-js": "^1.8.17",
"@grpc/proto-loader": "^0.7.7",
"@jest/globals": "^28.1.0",

View File

@ -332,10 +332,7 @@ export const createConfiguredCurlInstance = ({
}
const { validateSSL } = settings;
if (!validateSSL) {
// node-libcurl 2.4.1-4 macOS is build with `--with-secure-transport` TLS backend (in order to read the keychain) which interferes with disabling VERIFY_HOST curl option
if (process.platform !== 'darwin') {
curl.setOpt(Curl.option.SSL_VERIFYHOST, 0);
}
curl.setOpt(Curl.option.SSL_VERIFYHOST, 0);
curl.setOpt(Curl.option.SSL_VERIFYPEER, 0);
}
debugTimeline.push({ value: `${validateSSL ? 'Enable' : 'Disable'} SSL validation`, name: 'Text', timestamp: Date.now() });