pub unsafe extern "C" fn mbedtls_ssl_ticket_rotate(
ctx: *mut mbedtls_ssl_ticket_context,
name: *const c_uchar,
nlength: usize,
k: *const c_uchar,
klength: usize,
lifetime: u32,
) -> c_intExpand description
\brief Rotate session ticket encryption key to new specified key. Provides for external control of session ticket encryption key rotation, e.g. for synchronization between different machines. If this function is not used, or if not called before ticket lifetime expires, then a new session ticket encryption key is generated internally in order to avoid unbounded session ticket encryption key lifetimes.
\param ctx Context to be set up \param name Session ticket encryption key name \param nlength Session ticket encryption key name length in bytes \param k Session ticket encryption key \param klength Session ticket encryption key length in bytes \param lifetime Tickets lifetime in seconds Recommended value: 86400 (one day).
\note \c name and \c k are recommended to be cryptographically random data.
\note \c nlength must match sizeof( ctx->name )
\note \c klength must be sufficient for use by cipher specified to \c mbedtls_ssl_ticket_setup
\note It is recommended to pick a reasonable lifetime so as not to negate the benefits of forward secrecy.
\note The TLS 1.3 specification states that ticket lifetime must be smaller than seven days. If ticket lifetime has been set to a value greater than seven days in this module then if the TLS 1.3 is configured to send tickets after the handshake it will fail the connection when trying to send the first ticket.
\return 0 if successful, or a specific MBEDTLS_ERR_XXX error code