-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathdeno_tls.deno.txt
52 lines (41 loc) · 2.22 KB
/
deno_tls.deno.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
┏━━━━━━━━━━━━━━┓
┃ DENO_TLS ┃
┗━━━━━━━━━━━━━━┛
VERSION ==> #See deno doc
┌──────────┐
│ OPEN │
└──────────┘
Deno.connectTls(TLS_OPTS)
->>TCP_CONN #Connect to TLS socket
Deno.listenTls(STLS_OPTS)
->>TCP_LISTENER #Open TLS socket
Deno.startTls
(TCP_CONN[, NTLS_OPTS])
->>TCP_CONN2 #Turn TCP socket into TLS
[S]TLS_OPTS #Inherits from [S]TCP_OPTS, except no Unix socket
NTLS_OPTS #Only inherits TCP_OPTS.hostname. No Unix socket
┌──────────────────┐
│ CERTIFICATES │
└──────────────────┘
deno bench|compile|install|repl
|run|serve|test
--unsafely-ignore-certificate
-errors[=HOSTNAME,...] #Disables verification of TLS certificates
ENVVAR DENO_TLS_CA_STORE #'STR,...' among 'mozilla' (def) or 'system'
ENVVAR DENO_CERT
deno bench|check|compile
|eval|info|install|repl|run|serve
|test|upgrade
--cert #'PEM' to CA authority
[N]TLS_OPTS|HCOPTS.caCerts #'PEM'_ARR of root certificates
[S]TLS_OPTS|HCOPTS.keyFormat #Always 'pem'
[S]TLS_OPTS|HCOPTS.cert #'PEM' of certificate chain
[S]TLS_OPTS|HCOPTS.key #'PEM' of server certificate
┌──────────┐
│ ALPN │
└──────────┘
[S|N]TLS_OPTS.alpnProtocols #'PROTOCOL'_ARR (def: [])
#E.g. ['h2', 'http/1.1'] to allow both
#Upgrade [C] not supported
TCP_CONN.handshake()->>OBJ #OBJ: alpnProtocol 'PROTOCOL'|null
#Only with TLS