mbedtls_asn1_get_mpi() function
Retrieve an integer ASN.1 tag and its value. Updates the pointer to immediately behind the full tag.
Syntax
int mbedtls_asn1_get_mpi(unsigned char **p,
const unsigned char *end,
mbedtls_mpi *X);
Arguments
p
On entry, \c *p points to the start of the ASN.1 element. On successful completion, \c *p points to the first byte beyond the ASN.1 element. On error, the value of \c *p is undefined.
X
On success, the parsed value.
Return value
0 if successful. An ASN.1 error code if the input does not start with a valid ASN.1 INTEGER. #MBEDTLS_ERR_ASN1_INVALID_LENGTH if the parsed value does not fit in an \c int. An MPI error code if the parsed value is too large.
![]()
int mbedtls_asn1_get_mpi(unsigned char **p,![]()
int mbedtls_asn1_get_mpi(unsigned char **p,![]()
if ((ret = mbedtls_asn1_get_mpi(&p, end, &dhm->P)) != 0 ||![]()
(ret = mbedtls_asn1_get_mpi(&p, end, &dhm->G)) != 0) {![]()
ret = mbedtls_asn1_get_mpi(&p, end, &rec);![]()
if ((ret = mbedtls_asn1_get_mpi(&p, end, &r)) != 0 ||![]()
(ret = mbedtls_asn1_get_mpi(&p, end, &s)) != 0) {![]()
if ((ret = mbedtls_asn1_get_mpi(&p, end_field, &grp->P)) != 0) {![]()
if ((ret = mbedtls_asn1_get_mpi(&p, end, &grp->N)) != 0) {![]()
ret = mbedtls_asn1_get_mpi(p, end, X);
mbedtls_asn1_get_mpi() is called by 4 functions and calls 2 functions:
![]()
mbedtls_asn1_get_mpi()
mbedtls_asn1_get_mpi():
![]()
mbedtls_asn1_get_mpi()