mbedtls_pk_setup() function
Initialize a PK context with the information given and allocates the type-specific PK subcontext.
Arguments
ctx
Context to initialize. It must not have been set up yet (type #MBEDTLS_PK_NONE).
Return value
0 on success, MBEDTLS_ERR_PK_BAD_INPUT_DATA on invalid input, MBEDTLS_ERR_PK_ALLOC_FAILED on allocation failure.
Notes
For contexts holding an RSA-alt key, use \c mbedtls_pk_setup_rsa_alt() instead.
mbedtls_pk_setup() is called by 3 functions and calls 1 function:
![]()
mbedtls_pk_setup()
mbedtls_pk_setup() reads 1 variable and writes 2 variables:
![]()
mbedtls_pk_setup()