Types
KtlsError = object of OSError
- Raised for any kTLS setup or usage failure. Inherits OSError, so errorCode holds the errno and msg is human-readable.
KtlsKeyUpdateNeeded = object of KtlsError
- A TLS 1.3 KeyUpdate arrived and the kernel paused decryption. Reads fail with EKEYEXPIRED until the new RX key is installed via session.updateRxKey; poll reports no read events meanwhile.
Procs
proc checkKtls(rc: cint; what: string) {. ...raises: [KtlsKeyUpdateNeeded, KtlsError], tags: [], forbids: [].}
- Raise KtlsError when a raw syscall returned -1. Maps EKEYEXPIRED to KtlsKeyUpdateNeeded.
proc raiseKtls(msg: string; code = OSErrorCode(-1)) {....raises: [KtlsError], tags: [], forbids: [].}
- Raise KtlsError, defaulting the code to the last OS error.