struct
struct TlsConfig
Configuration for an outbound TLS connection.
defined in C:\Users\bye45\.glide\bin/src/stdlib/net/tls.glide
Configuration for an outbound TLS connection.
Configuration for an outbound TLS connection.
Server-side listener: holds the SSL_CTX with cert+key plus the underlying TCP listening socket. accept blocks for the next client and returns a TlsStream after the handshake succeeds.
Server-side counterpart to TlsStream::attach: wrap an already- accepted plain Conn in TLS for protocols that promote inline (STARTTLS, FTPS-AUTH-TLS, IMAP STARTTLS, POP3 STLS).
On success the returned TlsStream owns the underlying socket; the caller MUST NOT call conn.close() afterwards.
In an SMTP server, after the client sends STARTTLS:
let r: !*TlsStream = tls_attach_server(conn.fd, "cert.pem", "key.pem");
if r.ok { defer r.val.close(); /* communicate over TLS */ }