Lines Matching refs:pk_info
43 ctx->pk_info = NULL; in mbedtls_pk_init()
65 if ((ctx->pk_info != NULL) && (ctx->pk_info->ctx_free_func != NULL)) { in mbedtls_pk_free()
66 ctx->pk_info->ctx_free_func(ctx->pk_ctx); in mbedtls_pk_free()
72 if ((ctx->pk_info != NULL) && (ctx->pk_info->type != MBEDTLS_PK_OPAQUE)) { in mbedtls_pk_free()
86 ctx->pk_info = NULL; in mbedtls_pk_restart_init()
95 if (ctx == NULL || ctx->pk_info == NULL || in mbedtls_pk_restart_free()
96 ctx->pk_info->rs_free_func == NULL) { in mbedtls_pk_restart_free()
100 ctx->pk_info->rs_free_func(ctx->rs_ctx); in mbedtls_pk_restart_free()
102 ctx->pk_info = NULL; in mbedtls_pk_restart_free()
138 if (info == NULL || ctx->pk_info != NULL) { in mbedtls_pk_setup()
147 ctx->pk_info = info; in mbedtls_pk_setup()
163 if (ctx == NULL || ctx->pk_info != NULL) { in mbedtls_pk_setup_opaque()
184 ctx->pk_info = info; in mbedtls_pk_setup_opaque()
203 if (ctx->pk_info != NULL) { in mbedtls_pk_setup_rsa_alt()
211 ctx->pk_info = info; in mbedtls_pk_setup_rsa_alt()
232 if (ctx == NULL || ctx->pk_info == NULL) { in mbedtls_pk_can_do()
236 return ctx->pk_info->can_do(type); in mbedtls_pk_can_do()
251 if (ctx == NULL || ctx->pk_info == NULL) { in mbedtls_pk_can_do_ext()
292 if (ctx->pk_info->can_do(type) == 0) { in mbedtls_pk_can_do_ext()
1016 if (ctx == NULL || ctx->pk_info != NULL) { in pk_restart_setup()
1029 ctx->pk_info = info; in pk_restart_setup()
1048 if (ctx->pk_info == NULL || in mbedtls_pk_verify_restartable()
1057 ctx->pk_info->verify_rs_func != NULL) { in mbedtls_pk_verify_restartable()
1060 if ((ret = pk_restart_setup(rs_ctx, ctx->pk_info)) != 0) { in mbedtls_pk_verify_restartable()
1064 ret = ctx->pk_info->verify_rs_func(ctx, in mbedtls_pk_verify_restartable()
1077 if (ctx->pk_info->verify_func == NULL) { in mbedtls_pk_verify_restartable()
1081 return ctx->pk_info->verify_func(ctx, md_alg, hash, hash_len, in mbedtls_pk_verify_restartable()
1108 if (ctx->pk_info == NULL) { in mbedtls_pk_verify_ext()
1240 if (ctx->pk_info == NULL || pk_hashlen_helper(md_alg, &hash_len) != 0) { in mbedtls_pk_sign_restartable()
1248 ctx->pk_info->sign_rs_func != NULL) { in mbedtls_pk_sign_restartable()
1251 if ((ret = pk_restart_setup(rs_ctx, ctx->pk_info)) != 0) { in mbedtls_pk_sign_restartable()
1255 ret = ctx->pk_info->sign_rs_func(ctx, md_alg, in mbedtls_pk_sign_restartable()
1270 if (ctx->pk_info->sign_func == NULL) { in mbedtls_pk_sign_restartable()
1274 return ctx->pk_info->sign_func(ctx, md_alg, in mbedtls_pk_sign_restartable()
1304 if (ctx->pk_info == NULL) { in mbedtls_pk_sign_ext()
1379 if (ctx->pk_info == NULL) { in mbedtls_pk_decrypt()
1383 if (ctx->pk_info->decrypt_func == NULL) { in mbedtls_pk_decrypt()
1387 return ctx->pk_info->decrypt_func(ctx, input, ilen, in mbedtls_pk_decrypt()
1399 if (ctx->pk_info == NULL) { in mbedtls_pk_encrypt()
1403 if (ctx->pk_info->encrypt_func == NULL) { in mbedtls_pk_encrypt()
1407 return ctx->pk_info->encrypt_func(ctx, input, ilen, in mbedtls_pk_encrypt()
1419 if (pub->pk_info == NULL || in mbedtls_pk_check_pair()
1420 prv->pk_info == NULL) { in mbedtls_pk_check_pair()
1428 if (prv->pk_info->check_pair_func == NULL) { in mbedtls_pk_check_pair()
1432 if (prv->pk_info->type == MBEDTLS_PK_RSA_ALT) { in mbedtls_pk_check_pair()
1433 if (pub->pk_info->type != MBEDTLS_PK_RSA) { in mbedtls_pk_check_pair()
1437 if ((prv->pk_info->type != MBEDTLS_PK_OPAQUE) && in mbedtls_pk_check_pair()
1438 (pub->pk_info != prv->pk_info)) { in mbedtls_pk_check_pair()
1443 return prv->pk_info->check_pair_func((mbedtls_pk_context *) pub, in mbedtls_pk_check_pair()
1455 if (ctx == NULL || ctx->pk_info == NULL) { in mbedtls_pk_get_bitlen()
1459 return ctx->pk_info->get_bitlen((mbedtls_pk_context *) ctx); in mbedtls_pk_get_bitlen()
1467 if (ctx->pk_info == NULL) { in mbedtls_pk_debug()
1471 if (ctx->pk_info->debug_func == NULL) { in mbedtls_pk_debug()
1475 ctx->pk_info->debug_func((mbedtls_pk_context *) ctx, items); in mbedtls_pk_debug()
1484 if (ctx == NULL || ctx->pk_info == NULL) { in mbedtls_pk_get_name()
1488 return ctx->pk_info->name; in mbedtls_pk_get_name()
1496 if (ctx == NULL || ctx->pk_info == NULL) { in mbedtls_pk_get_type()
1500 return ctx->pk_info->type; in mbedtls_pk_get_type()