Skip to content

Commit 9fddbed

Browse files
authored
Add DENO_CERT environment variable for Deno TLS support (#97)
Deno uses DENO_CERT instead of standard SSL_CERT_FILE to specify custom CA certificates. Without this, Deno programs fail with certificate errors when running under httpjail.
1 parent dec08ee commit 9fddbed

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

docs/advanced/tls-interception.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ httpjail sets these environment variables for the child process:
2121
- `CURL_CA_BUNDLE` - curl
2222
- `REQUESTS_CA_BUNDLE` - Python requests
2323
- `NODE_EXTRA_CA_CERTS` - Node.js
24+
- `DENO_CERT` - Deno
2425
- `CARGO_HTTP_CAINFO` - Cargo
2526
- `GIT_SSL_CAINFO` - Git
2627

docs/guide/platform-support.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,5 +138,6 @@ httpjail sets these variables for the child process to trust the CA certificate:
138138
- `CURL_CA_BUNDLE` - curl
139139
- `REQUESTS_CA_BUNDLE` - Python requests
140140
- `NODE_EXTRA_CA_CERTS` - Node.js
141+
- `DENO_CERT` - Deno
141142
- `CARGO_HTTP_CAINFO` - Cargo
142143
- `GIT_SSL_CAINFO` - Git

src/tls.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,9 @@ impl CertificateManager {
365365
// Python requests
366366
("REQUESTS_CA_BUNDLE".to_string(), ca_path_str.clone()),
367367
// Node.js
368-
("NODE_EXTRA_CA_CERTS".to_string(), ca_path_str),
368+
("NODE_EXTRA_CA_CERTS".to_string(), ca_path_str.clone()),
369+
// Deno
370+
("DENO_CERT".to_string(), ca_path_str),
369371
];
370372

371373
Ok(env_vars)

0 commit comments

Comments
 (0)