-
Notifications
You must be signed in to change notification settings - Fork 16
/
deno_tls.deno.txt
67 lines (48 loc) · 3.7 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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|test
--unsafely-ignore-certificate
-errors[=HOSTNAME,...] #DANGER: Disables verification of TLS certificates
ENVVAR DENO_TLS_CA_STORE #'STR,...' among 'mozilla' (def) or 'system'
ENVVAR DENO_CERT
deno bench|cache|check|compile
|eval|info|install|repl|run
|test|upgrade|vendor
--cert #'PEM' to CA authority
[N]TLS_OPTS|HCOPTS.caCerts #'PEM'_ARR of root certificates
TLS_OPTS|HCOPTS.certChain
STLS_OPTS.cert #'PEM' of certificate chain
TLS_OPTS|HCOPTS.privateKey #'PEM' (RSA|PKCS8) of client certificate
STLS_OPTS.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