Skip to main content

mbedtls_asn1_write_algorithm_identifier_ext

Function mbedtls_asn1_write_algorithm_identifier_ext 

Source
pub unsafe extern "C" fn mbedtls_asn1_write_algorithm_identifier_ext(
    p: *mut *mut c_uchar,
    start: *const c_uchar,
    oid: *const c_char,
    oid_len: usize,
    par_len: usize,
    has_par: c_int,
) -> c_int
Expand description

\brief Write an AlgorithmIdentifier sequence 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 oid The OID of the algorithm to write. \param oid_len The length of the algorithm’s OID. \param par_len The length of the parameters, which must be already written. \param has_par If there are any parameters. If 0, par_len must be 0. If 1 and \p par_len is 0, NULL parameters are added.

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