Ssl
The ssl library implements (most of) the LuaSec API.
- ssl.wrap(sock, config)
Wrap a socket with a TLS Stream
- class ssl.CertificateTable
Both the certificate and key field can either be a relative path pointing to a file in the driver package or the contents as a string formatted in the PEM format.
- certificate: str
The certificate
- key: str
Optional private key, should only be set in 1 of the certificates list
- password: str
Optional password
- class ssl.SslConfig
- mode: str
client or server
- protocol: str
any
- cafile: str
The contents of the certificate authority’s root cert or relative path to the root cert file
- capath: str
A path to the certificate authority directory
- certificates: list[CertificateTable]
list of certificates
- verify: str
One of none, peer, fail_if_no_peer_cert, or client_once
- depth: integer
The depth to verify
- options: list[str]
“all” | “allow_unsafe_legacy_renegotiation” | “cipher_server_preference” | “cookie_exchange” | “dont_insert_empty_fragments” | “no_compression” | “no_dtlsv1” | “no_dtlsv1_2” | “no_query_mtu” | “no_session_resumption_on_renegotiation” | “no_ssl_mask” | “no_sslv2” | “no_sslv3” | “no_ticket” | “no_tlsv1” | “no_tlsv1_1” | “no_tlsv1_2” | “single_dh_use” | “single_ecdh_use” | “tls_rollback_bug”