diff options
author | Asher Gomez <ashersaupingomez@gmail.com> | 2024-02-19 01:26:16 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-18 07:26:16 -0700 |
commit | 3a243c827238b93c3f09a38e3b5e90e2ccfc15a1 (patch) | |
tree | 47447f0c214693be360776ee5e43849d8eda287f /ext/fetch/lib.rs | |
parent | 08071f9561b17b8899f370dc771604c2c2da445f (diff) |
BREAKING: add `Deno.CreateHttpClientOptions.{cert,key}` (#22280)
This change deprecates
`Deno.CreateHttpClientOptions.{certChain,privateKey}` in favour of
`Deno.CreateHttpClientOptions.{cert,key}`.
Closes #22278
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
Diffstat (limited to 'ext/fetch/lib.rs')
-rw-r--r-- | ext/fetch/lib.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/fetch/lib.rs b/ext/fetch/lib.rs index b5ef3e62c..02ce34810 100644 --- a/ext/fetch/lib.rs +++ b/ext/fetch/lib.rs @@ -794,8 +794,8 @@ impl HttpClientResource { pub struct CreateHttpClientArgs { ca_certs: Vec<String>, proxy: Option<Proxy>, - cert_chain: Option<String>, - private_key: Option<String>, + cert: Option<String>, + key: Option<String>, pool_max_idle_per_host: Option<usize>, pool_idle_timeout: Option<serde_json::Value>, #[serde(default = "default_true")] @@ -826,12 +826,12 @@ where } let client_cert_chain_and_key = { - if args.cert_chain.is_some() || args.private_key.is_some() { + if args.cert.is_some() || args.key.is_some() { let cert_chain = args - .cert_chain + .cert .ok_or_else(|| type_error("No certificate chain provided"))?; let private_key = args - .private_key + .key .ok_or_else(|| type_error("No private key provided"))?; Some((cert_chain, private_key)) |