Lines Matching full:null
43 ctx->pk_info = NULL; in mbedtls_pk_init()
44 ctx->pk_ctx = NULL; in mbedtls_pk_init()
61 if (ctx == NULL) { in mbedtls_pk_free()
65 if ((ctx->pk_info != NULL) && (ctx->pk_info->ctx_free_func != NULL)) { 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()
87 ctx->rs_ctx = 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()
102 ctx->pk_info = NULL; in mbedtls_pk_restart_free()
103 ctx->rs_ctx = NULL; in mbedtls_pk_restart_free()
129 return NULL; in mbedtls_pk_info_from_type()
138 if (info == NULL || ctx->pk_info != NULL) { in mbedtls_pk_setup()
142 if ((info->ctx_alloc_func != NULL) && in mbedtls_pk_setup()
143 ((ctx->pk_ctx = info->ctx_alloc_func()) == NULL)) { in mbedtls_pk_setup()
159 const mbedtls_pk_info_t *info = NULL; in mbedtls_pk_setup_opaque()
163 if (ctx == NULL || ctx->pk_info != NULL) { in mbedtls_pk_setup_opaque()
203 if (ctx->pk_info != NULL) { in mbedtls_pk_setup_rsa_alt()
207 if ((ctx->pk_ctx = info->ctx_alloc_func()) == NULL) { in mbedtls_pk_setup_rsa_alt()
229 /* A context with null pk_info is not set up yet and can't do anything. in mbedtls_pk_can_do()
230 * For backward compatibility, also accept NULL instead of a context in mbedtls_pk_can_do()
232 if (ctx == NULL || ctx->pk_info == NULL) { in mbedtls_pk_can_do()
248 /* A context with null pk_info is not set up yet and can't do anything. in mbedtls_pk_can_do_ext()
249 * For backward compatibility, also accept NULL instead of a context in mbedtls_pk_can_do_ext()
251 if (ctx == NULL || ctx->pk_info == NULL) { in mbedtls_pk_can_do_ext()
746 unsigned char *key_data = NULL; in import_public_into_psa()
873 if (pk == NULL) { in copy_from_psa()
1016 if (ctx == NULL || ctx->pk_info != NULL) { in pk_restart_setup()
1021 if (info->rs_alloc_func == NULL || info->rs_free_func == NULL) { in pk_restart_setup()
1025 if ((ctx->rs_ctx = info->rs_alloc_func()) == NULL) { in pk_restart_setup()
1044 if ((md_alg != MBEDTLS_MD_NONE || hash_len != 0) && hash == NULL) { in mbedtls_pk_verify_restartable()
1048 if (ctx->pk_info == NULL || in mbedtls_pk_verify_restartable()
1055 if (rs_ctx != NULL && in mbedtls_pk_verify_restartable()
1057 ctx->pk_info->verify_rs_func != NULL) { in mbedtls_pk_verify_restartable()
1077 if (ctx->pk_info->verify_func == NULL) { in mbedtls_pk_verify_restartable()
1093 sig, sig_len, NULL); in mbedtls_pk_verify()
1104 if ((md_alg != MBEDTLS_MD_NONE || hash_len != 0) && hash == NULL) { in mbedtls_pk_verify_ext()
1108 if (ctx->pk_info == NULL) { in mbedtls_pk_verify_ext()
1118 if (options != NULL) { in mbedtls_pk_verify_ext()
1126 * below would return a NULL pointer. */ in mbedtls_pk_verify_ext()
1141 if (options == NULL) { in mbedtls_pk_verify_ext()
1236 if ((md_alg != MBEDTLS_MD_NONE || hash_len != 0) && hash == NULL) { in mbedtls_pk_sign_restartable()
1240 if (ctx->pk_info == NULL || pk_hashlen_helper(md_alg, &hash_len) != 0) { in mbedtls_pk_sign_restartable()
1246 if (rs_ctx != NULL && in mbedtls_pk_sign_restartable()
1248 ctx->pk_info->sign_rs_func != NULL) { in mbedtls_pk_sign_restartable()
1270 if (ctx->pk_info->sign_func == NULL) { in mbedtls_pk_sign_restartable()
1290 f_rng, p_rng, NULL); in mbedtls_pk_sign()
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()
1399 if (ctx->pk_info == NULL) { in mbedtls_pk_encrypt()
1403 if (ctx->pk_info->encrypt_func == NULL) { 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()
1424 if (f_rng == NULL) { in mbedtls_pk_check_pair()
1428 if (prv->pk_info->check_pair_func == NULL) { in mbedtls_pk_check_pair()
1453 /* For backward compatibility, accept NULL or a context that in mbedtls_pk_get_bitlen()
1455 if (ctx == NULL || ctx->pk_info == NULL) { 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()
1484 if (ctx == NULL || ctx->pk_info == NULL) { in mbedtls_pk_get_name()
1496 if (ctx == NULL || ctx->pk_info == NULL) { in mbedtls_pk_get_type()