ztcl::tls
ztcl::tls socket ?-servername name? ?-alpn protocols? ?-cadata pem? ?-verify boolean? host port
A TLS 1.3 client: connects to host on port, runs the handshake, checks the certificate chain and the host name, and gives a channel. Load it with package require ztcl::tls.
This page also has ztcl::tls::socket.
Options
| Option | What it does |
|---|---|
-servername name |
The DNS name for SNI and for the check of the certificate. The default is host. |
-alpn protocols |
A list of up to 8 ALPN protocols. |
-cadata pem |
The trust anchors as PEM text, in place of the store of the system. |
-verify boolean |
With 0, the chain and the host name are not checked. The default is 1. |
Subcommands
| Synopsis | What it does |
|---|---|
socket ?option value ...? host port |
Opens the connection and gives the name of the channel. A failed handshake closes the connection and gives an error. |
Facts
- Capability:
socket. A new interpreter does not have this command. See Limits and capabilities. - Compute cost: one compute unit for the call, and more for the commands that it runs.
- The full page: ztcl::tls.