pub type mbedtls_ssl_ticket_parse_t = Option<unsafe extern "C" fn(p_ticket: *mut c_void, session: *mut mbedtls_ssl_session, buf: *mut c_uchar, len: usize) -> c_int>;
Expand description

\brief Callback type: parse and load session ticket

\note This describes what a callback implementation should do. This callback should parse a session ticket as generated by the corresponding mbedtls_ssl_ticket_write_t function, and, if the ticket is authentic and valid, load the session.

\note The implementation is allowed to modify the first len bytes of the input buffer, eg to use it as a temporary area for the decrypted ticket contents.

\param p_ticket Context for the callback \param session SSL session to be loaded \param buf Start of the buffer containing the ticket \param len Length of the ticket.

\return 0 if successful, or MBEDTLS_ERR_SSL_INVALID_MAC if not authentic, or MBEDTLS_ERR_SSL_SESSION_TICKET_EXPIRED if expired, or any other non-zero code for other failures.

Aliased Type§

enum mbedtls_ssl_ticket_parse_t {
    None,
    Some(unsafe extern "C" fn(_: *mut c_void, _: *mut mbedtls_ssl_session, _: *mut u8, _: usize) -> i32),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(_: *mut c_void, _: *mut mbedtls_ssl_session, _: *mut u8, _: usize) -> i32)

Some value of type T.