mbedtls_asn1_write_algorithm_identifier_ext() function
Write an AlgorithmIdentifier sequence in ASN.1 format.
Syntax
int mbedtls_asn1_write_algorithm_identifier_ext(unsigned char **p,
const unsigned char *start,
const char *oid,
size_t oid_len,
size_t par_len,
int has_par);
Arguments
p
The reference to the current position pointer.
start
The start of the buffer, for bounds-checking.
oid
The OID of the algorithm to write.
oid_len
The length of the algorithm's OID.
par_len
The length of the parameters, which must be already written.
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 value
The number of bytes written to \p p on success. A negative \c MBEDTLS_ERR_ASN1_XXX error code on failure.
Notes
This function works backwards in data buffer.
![]()
int mbedtls_asn1_write_algorithm_identifier_ext(unsigned char **p, const unsigned char *start,![]()
int mbedtls_asn1_write_algorithm_identifier_ext(unsigned char **p,![]()
mbedtls_asn1_write_algorithm_identifier_ext(p, buf, oid, oid_len, 0, 0));![]()
mbedtls_asn1_write_algorithm_identifier_ext(&c, buf,
mbedtls_asn1_write_algorithm_identifier_ext() is called by 5 functions and calls 3 functions:
![]()
mbedtls_asn1_write_algorithm_identifier_ext()
mbedtls_asn1_write_algorithm_identifier_ext():
![]()
mbedtls_asn1_write_algorithm_identifier_ext()