Skip to main content

mbedtls_asn1_write_bool

Function mbedtls_asn1_write_bool 

Source
pub unsafe extern "C" fn mbedtls_asn1_write_bool(
    p: *mut *mut c_uchar,
    start: *const c_uchar,
    boolean: c_int,
) -> c_int
Expand description

\brief Write a boolean tag (#MBEDTLS_ASN1_BOOLEAN) and value in ASN.1 format.

\note This function works backwards in data buffer.

\param p The reference to the current position pointer. \param start The start of the buffer, for bounds-checking. \param boolean The boolean value to write, either \c 0 or \c 1.

\return The number of bytes written to \p p on success. \return A negative \c MBEDTLS_ERR_ASN1_XXX error code on failure.