| /optee_os/lib/libmbedtls/mbedtls/library/ |
| H A D | ecdsa.c | 146 #define ECDSA_RS_ECP (rs_ctx == NULL ? NULL : &rs_ctx->ecp) 155 if (rs_ctx != NULL && rs_ctx->ecp.depth++ == 0) \ 156 rs_ctx->ecp.ops_done = 0; \ 160 rs_ctx != NULL && rs_ctx->SUB == NULL) \ 162 rs_ctx->SUB = mbedtls_calloc(1, sizeof(*rs_ctx->SUB)); \ 163 if (rs_ctx->SUB == NULL) \ 166 ecdsa_restart_## SUB ##_init(rs_ctx->SUB); \ 173 if (rs_ctx != NULL && rs_ctx->SUB != NULL && \ 176 ecdsa_restart_## SUB ##_free(rs_ctx->SUB); \ 177 mbedtls_free(rs_ctx->SUB); \ [all …]
|
| H A D | ecp.c | 247 mbedtls_ecp_restart_ctx *rs_ctx, in mbedtls_ecp_check_budget() argument 250 if (rs_ctx != NULL && ecp_max_ops != 0) { in mbedtls_ecp_check_budget() 263 if ((rs_ctx->ops_done != 0) && in mbedtls_ecp_check_budget() 264 (rs_ctx->ops_done > ecp_max_ops || in mbedtls_ecp_check_budget() 265 ops > ecp_max_ops - rs_ctx->ops_done)) { in mbedtls_ecp_check_budget() 270 rs_ctx->ops_done += ops; in mbedtls_ecp_check_budget() 279 if (rs_ctx != NULL && rs_ctx->depth++ == 0) \ 280 rs_ctx->ops_done = 0; \ 284 rs_ctx != NULL && rs_ctx->SUB == NULL) \ 286 rs_ctx->SUB = mbedtls_calloc(1, sizeof(*rs_ctx->SUB)); \ [all …]
|
| H A D | ecdh.c | 58 mbedtls_ecp_restart_ctx *rs_ctx) in ecdh_gen_public_restartable() argument 64 restarting = (rs_ctx != NULL && rs_ctx->rsm != NULL); in ecdh_gen_public_restartable() 72 f_rng, p_rng, rs_ctx)); in ecdh_gen_public_restartable() 98 mbedtls_ecp_restart_ctx *rs_ctx) in ecdh_compute_shared_restartable() argument 106 f_rng, p_rng, rs_ctx)); in ecdh_compute_shared_restartable() 285 mbedtls_ecp_restart_ctx *rs_ctx = NULL; in ecdh_make_params_internal() local 294 rs_ctx = &ctx->rs; in ecdh_make_params_internal() 303 f_rng, p_rng, rs_ctx)) != 0) { in ecdh_make_params_internal() 503 mbedtls_ecp_restart_ctx *rs_ctx = NULL; in ecdh_make_public_internal() local 512 rs_ctx = &ctx->rs; in ecdh_make_public_internal() [all …]
|
| H A D | x509_crt.c | 2126 mbedtls_x509_crt_restart_ctx *rs_ctx) in x509_crt_check_signature() argument 2160 if (rs_ctx != NULL && child->sig_pk == MBEDTLS_PK_ECDSA) { in x509_crt_check_signature() 2163 child->sig.p, child->sig.len, &rs_ctx->pk); in x509_crt_check_signature() 2166 (void) rs_ctx; in x509_crt_check_signature() 2262 mbedtls_x509_crt_restart_ctx *rs_ctx, in x509_crt_find_parent_in() argument 2271 if (rs_ctx != NULL && rs_ctx->parent != NULL) { in x509_crt_find_parent_in() 2273 parent = rs_ctx->parent; in x509_crt_find_parent_in() 2274 fallback_parent = rs_ctx->fallback_parent; in x509_crt_find_parent_in() 2275 fallback_signature_is_good = rs_ctx->fallback_signature_is_good; in x509_crt_find_parent_in() 2278 rs_ctx->parent = NULL; in x509_crt_find_parent_in() [all …]
|
| H A D | pk_wrap.h | 52 void *rs_ctx); 59 void *p_rng, void *rs_ctx); 90 void (*rs_free_func)(void *rs_ctx);
|
| H A D | pk.c | 87 ctx->rs_ctx = NULL; in mbedtls_pk_restart_init() 100 ctx->pk_info->rs_free_func(ctx->rs_ctx); in mbedtls_pk_restart_free() 103 ctx->rs_ctx = NULL; in mbedtls_pk_restart_free() 1025 if ((ctx->rs_ctx = info->rs_alloc_func()) == NULL) { in pk_restart_setup() 1042 mbedtls_pk_restart_ctx *rs_ctx) in mbedtls_pk_verify_restartable() argument 1055 if (rs_ctx != NULL && in mbedtls_pk_verify_restartable() 1060 if ((ret = pk_restart_setup(rs_ctx, ctx->pk_info)) != 0) { in mbedtls_pk_verify_restartable() 1065 md_alg, hash, hash_len, sig, sig_len, rs_ctx->rs_ctx); in mbedtls_pk_verify_restartable() 1068 mbedtls_pk_restart_free(rs_ctx); in mbedtls_pk_verify_restartable() 1074 (void) rs_ctx; in mbedtls_pk_verify_restartable() [all …]
|
| H A D | pk_wrap.c | 827 void *rs_ctx); 833 void *rs_ctx); 848 eckey_restart_ctx *rs_ctx; in eckey_rs_alloc() local 853 rs_ctx = ctx; in eckey_rs_alloc() 854 mbedtls_ecdsa_restart_init(&rs_ctx->ecdsa_rs); in eckey_rs_alloc() 855 mbedtls_ecdsa_init(&rs_ctx->ecdsa_ctx); in eckey_rs_alloc() 863 eckey_restart_ctx *rs_ctx; in eckey_rs_free() local 869 rs_ctx = ctx; in eckey_rs_free() 870 mbedtls_ecdsa_restart_free(&rs_ctx->ecdsa_rs); in eckey_rs_free() 871 mbedtls_ecdsa_free(&rs_ctx->ecdsa_ctx); in eckey_rs_free() [all …]
|
| H A D | ssl_tls12_client.c | 2302 void *rs_ctx = NULL; in ssl_parse_server_key_exchange() local 2404 rs_ctx = &ssl->handshake->ecrs_ctx.pk; in ssl_parse_server_key_exchange() 2425 md_alg, hash, hashlen, p, sig_len, rs_ctx); in ssl_parse_server_key_exchange() 3250 void *rs_ctx = NULL; in ssl_write_certificate_verify() local 3337 rs_ctx = &ssl->handshake->ecrs_ctx.pk; in ssl_write_certificate_verify() 3346 ssl->conf->f_rng, ssl->conf->p_rng, rs_ctx)) != 0) { in ssl_write_certificate_verify()
|
| H A D | ssl_tls.c | 8018 void *rs_ctx = NULL; in mbedtls_ssl_parse_certificate() local 8086 rs_ctx = &ssl->handshake->ecrs_ctx; in mbedtls_ssl_parse_certificate() 8092 rs_ctx); in mbedtls_ssl_parse_certificate() 9873 void *rs_ctx) in mbedtls_ssl_verify_certificate() argument 9904 ((void) rs_ctx); in mbedtls_ssl_verify_certificate() 9942 f_vrfy, p_vrfy, rs_ctx); in mbedtls_ssl_verify_certificate()
|
| H A D | ssl_misc.h | 1729 void *rs_ctx);
|
| /optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ |
| H A D | ecdsa.h | 280 mbedtls_ecdsa_restart_ctx *rs_ctx); 341 mbedtls_ecdsa_restart_ctx *rs_ctx); 421 mbedtls_ecdsa_restart_ctx *rs_ctx); 528 mbedtls_ecdsa_restart_ctx *rs_ctx); 595 mbedtls_ecdsa_restart_ctx *rs_ctx);
|
| H A D | ecp.h | 405 mbedtls_ecp_restart_ctx *rs_ctx, 410 MBEDTLS_MPI_CHK(mbedtls_ecp_check_budget(grp, rs_ctx, \ 1006 mbedtls_ecp_restart_ctx *rs_ctx); 1112 mbedtls_ecp_restart_ctx *rs_ctx);
|
| H A D | pk.h | 273 void *MBEDTLS_PRIVATE(rs_ctx); /**< Underlying restart context */ 779 mbedtls_pk_restart_ctx *rs_ctx); 925 mbedtls_pk_restart_ctx *rs_ctx);
|
| H A D | x509_crt.h | 752 mbedtls_x509_crt_restart_ctx *rs_ctx);
|