summaryrefslogtreecommitdiff
path: root/ext/fetch/22_http_client.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fetch/22_http_client.js')
-rw-r--r--ext/fetch/22_http_client.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/fetch/22_http_client.js b/ext/fetch/22_http_client.js
index c1ddbd7c4..e1389bbe1 100644
--- a/ext/fetch/22_http_client.js
+++ b/ext/fetch/22_http_client.js
@@ -14,6 +14,7 @@ import { core, primordials } from "ext:core/mod.js";
import { SymbolDispose } from "ext:deno_web/00_infra.js";
import { op_fetch_custom_client } from "ext:core/ops";
+import { loadTlsKeyPair } from "ext:deno_net/02_tls.js";
const { internalRidSymbol } = core;
const { ObjectDefineProperty } = primordials;
@@ -24,9 +25,16 @@ const { ObjectDefineProperty } = primordials;
*/
function createHttpClient(options) {
options.caCerts ??= [];
+ const keyPair = loadTlsKeyPair(
+ options.cert,
+ undefined,
+ options.key,
+ undefined,
+ );
return new HttpClient(
op_fetch_custom_client(
options,
+ keyPair,
),
);
}