Lines Matching refs:pk_info

59     ctx->pk_info = NULL;  in mbedtls_pk_init()
71 if ( ctx->pk_info != NULL ) in mbedtls_pk_free()
72 ctx->pk_info->ctx_free_func( ctx->pk_ctx ); in mbedtls_pk_free()
84 ctx->pk_info = NULL; in mbedtls_pk_restart_init()
93 if( ctx == NULL || ctx->pk_info == NULL || in mbedtls_pk_restart_free()
94 ctx->pk_info->rs_free_func == NULL ) in mbedtls_pk_restart_free()
99 ctx->pk_info->rs_free_func( ctx->rs_ctx ); in mbedtls_pk_restart_free()
101 ctx->pk_info = NULL; in mbedtls_pk_restart_free()
138 if( info == NULL || ctx->pk_info != NULL ) in mbedtls_pk_setup()
144 ctx->pk_info = info; in mbedtls_pk_setup()
161 if( ctx == NULL || ctx->pk_info != NULL ) in mbedtls_pk_setup_opaque()
176 ctx->pk_info = info; in mbedtls_pk_setup_opaque()
198 if( ctx->pk_info != NULL ) in mbedtls_pk_setup_rsa_alt()
204 ctx->pk_info = info; in mbedtls_pk_setup_rsa_alt()
225 if( ctx == NULL || ctx->pk_info == NULL ) in mbedtls_pk_can_do()
228 return( ctx->pk_info->can_do( type ) ); in mbedtls_pk_can_do()
256 if( ctx == NULL || ctx->pk_info != NULL ) in pk_restart_setup()
266 ctx->pk_info = info; in pk_restart_setup()
286 if( ctx->pk_info == NULL || in mbedtls_pk_verify_restartable()
294 ctx->pk_info->verify_rs_func != NULL ) in mbedtls_pk_verify_restartable()
298 if( ( ret = pk_restart_setup( rs_ctx, ctx->pk_info ) ) != 0 ) in mbedtls_pk_verify_restartable()
301 ret = ctx->pk_info->verify_rs_func( ctx->pk_ctx, in mbedtls_pk_verify_restartable()
313 if( ctx->pk_info->verify_func == NULL ) in mbedtls_pk_verify_restartable()
316 return( ctx->pk_info->verify_func( ctx->pk_ctx, md_alg, hash, hash_len, in mbedtls_pk_verify_restartable()
344 if( ctx->pk_info == NULL ) in mbedtls_pk_verify_ext()
408 if( ctx->pk_info == NULL || in mbedtls_pk_sign_restartable()
416 ctx->pk_info->sign_rs_func != NULL ) in mbedtls_pk_sign_restartable()
420 if( ( ret = pk_restart_setup( rs_ctx, ctx->pk_info ) ) != 0 ) in mbedtls_pk_sign_restartable()
423 ret = ctx->pk_info->sign_rs_func( ctx->pk_ctx, md_alg, in mbedtls_pk_sign_restartable()
437 if( ctx->pk_info->sign_func == NULL ) in mbedtls_pk_sign_restartable()
440 return( ctx->pk_info->sign_func( ctx->pk_ctx, md_alg, in mbedtls_pk_sign_restartable()
472 if( ctx->pk_info == NULL ) in mbedtls_pk_decrypt()
475 if( ctx->pk_info->decrypt_func == NULL ) in mbedtls_pk_decrypt()
478 return( ctx->pk_info->decrypt_func( ctx->pk_ctx, input, ilen, in mbedtls_pk_decrypt()
495 if( ctx->pk_info == NULL ) in mbedtls_pk_encrypt()
498 if( ctx->pk_info->encrypt_func == NULL ) in mbedtls_pk_encrypt()
501 return( ctx->pk_info->encrypt_func( ctx->pk_ctx, input, ilen, in mbedtls_pk_encrypt()
516 if( pub->pk_info == NULL || in mbedtls_pk_check_pair()
517 prv->pk_info == NULL ) in mbedtls_pk_check_pair()
525 if( prv->pk_info->check_pair_func == NULL ) in mbedtls_pk_check_pair()
528 if( prv->pk_info->type == MBEDTLS_PK_RSA_ALT ) in mbedtls_pk_check_pair()
530 if( pub->pk_info->type != MBEDTLS_PK_RSA ) in mbedtls_pk_check_pair()
535 if( pub->pk_info != prv->pk_info ) in mbedtls_pk_check_pair()
539 return( prv->pk_info->check_pair_func( pub->pk_ctx, prv->pk_ctx, f_rng, p_rng ) ); in mbedtls_pk_check_pair()
549 if( ctx == NULL || ctx->pk_info == NULL ) in mbedtls_pk_get_bitlen()
552 return( ctx->pk_info->get_bitlen( ctx->pk_ctx ) ); in mbedtls_pk_get_bitlen()
561 if( ctx->pk_info == NULL ) in mbedtls_pk_debug()
564 if( ctx->pk_info->debug_func == NULL ) in mbedtls_pk_debug()
567 ctx->pk_info->debug_func( ctx->pk_ctx, items ); in mbedtls_pk_debug()
576 if( ctx == NULL || ctx->pk_info == NULL ) in mbedtls_pk_get_name()
579 return( ctx->pk_info->name ); in mbedtls_pk_get_name()
587 if( ctx == NULL || ctx->pk_info == NULL ) in mbedtls_pk_get_type()
590 return( ctx->pk_info->type ); in mbedtls_pk_get_type()