Tls module

Tls_Error

structSource

The sentence for people ("the certificate has expired") is kept inside the error in detail_bytes; read it with detail(*error) or print the whole error with error_text. code is mbedTLS's own negative error number (0 when the error did not come from it).

Fields

io: Io.Io_Error
For IO, and the closest Io_Error for the other kinds that end a read or write.
code: s32
verify_flags: u32
For VERIFY with mbedTLS's own verification: its result bits (X509_BADCERT_*), else 0.
alert: u8
For a fatal alert the peer sent: its description number (RFC 8446, section 6; alert_name spells it), else 0.
wrong_key_password: bool
For CONFIG: the private key was not read because the password does not decrypt it (or was needed and not given).
detail_count: u8
detail_bytes: [191] u8

See also