menu
TlsConnectionBinding
import { TlsConnectionBinding } from "destack:tls/binding";
Connection binding family.
1export interface TlsConnectionBinding {2 openTlsConnection(context: TlsContextHandle, socket: SocketHandle, serverName?: &'a readonly string | undefined): Result<TlsConnectionHandle, HostError>;3 handshakeTlsConnection(connection: TlsConnectionHandle): Result<TlsHandshakeStatus, HostError>;4 readTlsConnection(connection: TlsConnectionHandle, buffer: &'a [uint8]): Result<uint64, HostError>;5 writeTlsConnection(connection: TlsConnectionHandle, buffer: &'a readonly [uint8]): Result<uint64, HostError>;6 shutdownTlsConnection(connection: TlsConnectionHandle): Result<void, HostError>;7 closeTlsConnection(connection: TlsConnectionHandle): Result<void, HostError>;8 readTlsAlpn(connection: TlsConnectionHandle): Result<uint8[], HostError>;9 readTlsPeerCertificatesPem(connection: TlsConnectionHandle): Result<uint8[], HostError>;10 exportTlsKeyingMaterial(connection: TlsConnectionHandle, label: &'a readonly string, context: &'b readonly [uint8], length: uint32): Result<uint8[], HostError>;11 readTlsResumptionState(connection: TlsConnectionHandle): Result<TlsResumptionState, HostError>;12}Members
openTlsConnection(context: TlsContextHandle, socket: SocketHandle, serverName?: &'a readonly string | undefined): Result<TlsConnectionHandle, HostError>Open one socket backed TLS connection.
handshakeTlsConnection(connection: TlsConnectionHandle): Result<TlsHandshakeStatus, HostError>Advance one TLS handshake state machine.
readTlsConnection(connection: TlsConnectionHandle, buffer: &'a [uint8]): Result<uint64, HostError>Read decrypted application bytes from one TLS connection.
writeTlsConnection(connection: TlsConnectionHandle, buffer: &'a readonly [uint8]): Result<uint64, HostError>Write plaintext application bytes to one TLS connection.
shutdownTlsConnection(connection: TlsConnectionHandle): Result<void, HostError>Shutdown one TLS connection.
closeTlsConnection(connection: TlsConnectionHandle): Result<void, HostError>Close one TLS connection.
readTlsAlpn(connection: TlsConnectionHandle): Result<uint8[], HostError>Read negotiated ALPN protocol bytes.
readTlsPeerCertificatesPem(connection: TlsConnectionHandle): Result<uint8[], HostError>Read the peer certificate chain in PEM encoding.
exportTlsKeyingMaterial(connection: TlsConnectionHandle, label: &'a readonly string, context: &'b readonly [uint8], length: uint32): Result<uint8[], HostError>Export keying material bytes for one TLS connection.
readTlsResumptionState(connection: TlsConnectionHandle): Result<TlsResumptionState, HostError>Return whether one connection resumed from cached state or ticket.