summaryrefslogtreecommitdiff
path: root/ext/fetch/22_http_client.js
diff options
context:
space:
mode:
authorMatt Mastracci <matthew@mastracci.com>2024-04-09 16:23:22 -0600
committerGitHub <noreply@github.com>2024-04-09 16:23:22 -0600
commite190acbfa8b41f92291e73c405735ba0d7b5b172 (patch)
tree38183f93f9675c93b27674798f7949a75eebdac6 /ext/fetch/22_http_client.js
parentf23155bca76b761632b10d37574fe4543cbe9a26 (diff)
refactor(ext/net): extract TLS key and certificate from interfaces (#23296)
Removes the certificate options from all the interfaces and replaces them with a new `TlsCertifiedKeyOptions`. This allows us to centralize the documentation for TLS key management for both client and server, and will allow us to add key object support in the future. Also adds an option `keyFormat` field to the cert/key that must be omitted or set to `pem`. This will allow us to load other format keys in the future `der`, `pfx`, etc. In a future PR, we will add a way to load a certified key object, and we will add another option to `TlsCertifiedKeyOptions` like so: ```ts export interface TlsCertifiedKeyOptions = | TlsCertifiedKeyPem | TlsCertifiedKeyFromFile | TlsCertifiedKeyConnectTls | { key: Deno.CertifiedKey } ```
Diffstat (limited to 'ext/fetch/22_http_client.js')
-rw-r--r--ext/fetch/22_http_client.js7
1 files changed, 1 insertions, 6 deletions
diff --git a/ext/fetch/22_http_client.js b/ext/fetch/22_http_client.js
index e1389bbe1..061a3dda8 100644
--- a/ext/fetch/22_http_client.js
+++ b/ext/fetch/22_http_client.js
@@ -25,12 +25,7 @@ const { ObjectDefineProperty } = primordials;
*/
function createHttpClient(options) {
options.caCerts ??= [];
- const keyPair = loadTlsKeyPair(
- options.cert,
- undefined,
- options.key,
- undefined,
- );
+ const keyPair = loadTlsKeyPair("Deno.createHttpClient", options);
return new HttpClient(
op_fetch_custom_client(
options,