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.