Skip to content

Commit 3914c80

Browse files
committed
Update Mockttp to allow legacy TLS renegotation on HTTPS whitelist
1 parent a2261b7 commit 3914c80

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"mime-types": "^2.1.27",
7777
"mobx": "^6.3.5",
7878
"mockrtc": "^0.3.1",
79-
"mockttp": "^3.9.3",
79+
"mockttp": "^3.9.4",
8080
"node-fetch": "^2.6.1",
8181
"node-forge": "^1.3.0",
8282
"node-gsettings-wrapper": "^0.5.0",

src/client/http-client.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import type * as Mockttp from 'mockttp';
1111
import {
1212
getDnsLookupFunction,
1313
shouldUseStrictHttps,
14-
UPSTREAM_TLS_OPTIONS as MOCKTTP_UPSTREAM_TLS_OPTIONS
14+
getUpstreamTlsOptions as getUpstreamMockttpTlsOptions
1515
} from 'mockttp/dist/rules/passthrough-handling';
1616
import { getAgent } from 'mockttp/dist/rules/http-agents';
1717
import { getEffectivePort } from 'mockttp/dist/util/request-utils';
@@ -104,11 +104,7 @@ export class HttpClient {
104104
lookup: this.getDns(options.lookupOptions?.servers),
105105

106106
// TLS options (should be effectively identical to Mockttp's passthrough config)
107-
...MOCKTTP_UPSTREAM_TLS_OPTIONS,
108-
minVersion: strictHttpsChecks
109-
? tls.DEFAULT_MIN_VERSION
110-
: 'TLSv1', // Allow TLSv1, if !strict
111-
rejectUnauthorized: strictHttpsChecks,
107+
...getUpstreamMockttpTlsOptions(strictHttpsChecks),
112108
...caConfig,
113109
...options.clientCertificate
114110
});

0 commit comments

Comments
 (0)