diff options
author | Luca Casonato <hello@lcas.dev> | 2021-09-30 09:26:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-30 09:26:15 +0200 |
commit | 0d7a417f332a57fb3e89250a1ce250b929d0b2f7 (patch) | |
tree | 8f63043fcf6c5419d6d213a196c54a8b421e3d8b /ext/net/02_tls.js | |
parent | 62920e4ef5bed131c125c4b8b5bdb8250584946f (diff) |
feat(tls): custom in memory CA certificates (#12219)
This adds support for using in memory CA certificates for
`Deno.startTLS`, `Deno.connectTLS` and `Deno.createHttpClient`.
`certFile` is deprecated in `startTls` and `connectTls`, and removed
from `Deno.createHttpClient`.
Diffstat (limited to 'ext/net/02_tls.js')
-rw-r--r-- | ext/net/02_tls.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/net/02_tls.js b/ext/net/02_tls.js index 343ec2e4f..9f8fb314c 100644 --- a/ext/net/02_tls.js +++ b/ext/net/02_tls.js @@ -28,6 +28,7 @@ hostname = "127.0.0.1", transport = "tcp", certFile = undefined, + caCerts = [], certChain = undefined, privateKey = undefined, }) { @@ -36,6 +37,7 @@ hostname, transport, certFile, + caCerts, certChain, privateKey, }); @@ -70,12 +72,13 @@ async function startTls( conn, - { hostname = "127.0.0.1", certFile } = {}, + { hostname = "127.0.0.1", certFile = undefined, caCerts = [] } = {}, ) { const res = await opStartTls({ rid: conn.rid, hostname, certFile, + caCerts, }); return new Conn(res.rid, res.remoteAddr, res.localAddr); } |