From b2e390f707cfb472ba3767c97480c4869f45a152 Mon Sep 17 00:00:00 2001 From: Jay Wu <130019718+notjaywu@users.noreply.github.com> Date: Thu, 11 Jan 2024 17:55:47 +0800 Subject: [PATCH] fix(curl): revert to use openssl on macos [INS-3445] (#6981) --- package-lock.json | 10 +++++----- packages/insomnia-send-request/package.json | 2 +- packages/insomnia/package.json | 2 +- packages/insomnia/src/main/network/libcurl-promise.ts | 5 +---- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index cae63fcf5..fa6d6c38c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/packages/insomnia-send-request/package.json b/packages/insomnia-send-request/package.json index d98e835c8..213c1d0da 100644 --- a/packages/insomnia-send-request/package.json +++ b/packages/insomnia-send-request/package.json @@ -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", diff --git a/packages/insomnia/package.json b/packages/insomnia/package.json index 416c15a8c..9868b37f1 100644 --- a/packages/insomnia/package.json +++ b/packages/insomnia/package.json @@ -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", diff --git a/packages/insomnia/src/main/network/libcurl-promise.ts b/packages/insomnia/src/main/network/libcurl-promise.ts index 73557d6e3..6eb3a6aa2 100644 --- a/packages/insomnia/src/main/network/libcurl-promise.ts +++ b/packages/insomnia/src/main/network/libcurl-promise.ts @@ -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() });