/mbedtls-3.4.0/library/ |
D | ecdsa.c | 158 #define ECDSA_RS_ECP ( rs_ctx == NULL ? NULL : &rs_ctx->ecp ) 167 if( rs_ctx != NULL && rs_ctx->ecp.depth++ == 0 ) \ 168 rs_ctx->ecp.ops_done = 0; \ 172 rs_ctx != NULL && rs_ctx->SUB == NULL ) \ 174 rs_ctx->SUB = mbedtls_calloc( 1, sizeof( *rs_ctx->SUB ) ); \ 175 if( rs_ctx->SUB == NULL ) \ 178 ecdsa_restart_## SUB ##_init( rs_ctx->SUB ); \ 185 if( rs_ctx != NULL && rs_ctx->SUB != NULL && \ 188 ecdsa_restart_## SUB ##_free( rs_ctx->SUB ); \ 189 mbedtls_free( rs_ctx->SUB ); \ [all …]
|
D | ecp.c | 253 mbedtls_ecp_restart_ctx *rs_ctx, in mbedtls_ecp_check_budget() argument 256 if( rs_ctx != NULL && ecp_max_ops != 0 ) in mbedtls_ecp_check_budget() 269 if( ( rs_ctx->ops_done != 0 ) && in mbedtls_ecp_check_budget() 270 ( rs_ctx->ops_done > ecp_max_ops || in mbedtls_ecp_check_budget() 271 ops > ecp_max_ops - rs_ctx->ops_done ) ) in mbedtls_ecp_check_budget() 277 rs_ctx->ops_done += ops; in mbedtls_ecp_check_budget() 286 if( rs_ctx != NULL && rs_ctx->depth++ == 0 ) \ 287 rs_ctx->ops_done = 0; \ 291 rs_ctx != NULL && rs_ctx->SUB == NULL ) \ 293 rs_ctx->SUB = mbedtls_calloc( 1, sizeof( *rs_ctx->SUB ) ); \ [all …]
|
D | ecdh.c | 70 mbedtls_ecp_restart_ctx *rs_ctx ) in ecdh_gen_public_restartable() argument 76 restarting = ( rs_ctx != NULL && rs_ctx->rsm != NULL ); in ecdh_gen_public_restartable() 83 f_rng, p_rng, rs_ctx ) ); in ecdh_gen_public_restartable() 109 mbedtls_ecp_restart_ctx *rs_ctx ) in ecdh_compute_shared_restartable() argument 117 f_rng, p_rng, rs_ctx ) ); in ecdh_compute_shared_restartable() 290 mbedtls_ecp_restart_ctx *rs_ctx = NULL; in ecdh_make_params_internal() local 298 rs_ctx = &ctx->rs; in ecdh_make_params_internal() 306 f_rng, p_rng, rs_ctx ) ) != 0 ) in ecdh_make_params_internal() 500 mbedtls_ecp_restart_ctx *rs_ctx = NULL; in ecdh_make_public_internal() local 508 rs_ctx = &ctx->rs; in ecdh_make_public_internal() [all …]
|
D | pk.c | 79 ctx->rs_ctx = NULL; in mbedtls_pk_restart_init() 93 ctx->pk_info->rs_free_func( ctx->rs_ctx ); in mbedtls_pk_restart_free() 96 ctx->rs_ctx = NULL; in mbedtls_pk_restart_free() 378 if( ( ctx->rs_ctx = info->rs_alloc_func() ) == NULL ) in pk_restart_setup() 394 mbedtls_pk_restart_ctx *rs_ctx ) in mbedtls_pk_verify_restartable() argument 405 if( rs_ctx != NULL && in mbedtls_pk_verify_restartable() 411 if( ( ret = pk_restart_setup( rs_ctx, ctx->pk_info ) ) != 0 ) in mbedtls_pk_verify_restartable() 415 md_alg, hash, hash_len, sig, sig_len, rs_ctx->rs_ctx ); in mbedtls_pk_verify_restartable() 418 mbedtls_pk_restart_free( rs_ctx ); in mbedtls_pk_verify_restartable() 423 (void) rs_ctx; in mbedtls_pk_verify_restartable() [all …]
|
D | x509_crt.c | 2441 mbedtls_x509_crt_restart_ctx *rs_ctx ) in x509_crt_check_signature() argument 2474 if( rs_ctx != NULL && child->sig_pk == MBEDTLS_PK_ECDSA ) in x509_crt_check_signature() 2478 child->sig.p, child->sig.len, &rs_ctx->pk ) ); in x509_crt_check_signature() 2481 (void) rs_ctx; in x509_crt_check_signature() 2575 mbedtls_x509_crt_restart_ctx *rs_ctx ) in x509_crt_find_parent_in() argument 2583 if( rs_ctx != NULL && rs_ctx->parent != NULL ) in x509_crt_find_parent_in() 2586 parent = rs_ctx->parent; in x509_crt_find_parent_in() 2587 fallback_parent = rs_ctx->fallback_parent; in x509_crt_find_parent_in() 2588 fallback_signature_is_good = rs_ctx->fallback_signature_is_good; in x509_crt_find_parent_in() 2591 rs_ctx->parent = NULL; in x509_crt_find_parent_in() [all …]
|
D | pk_wrap.c | 662 void *rs_ctx ); 668 void *rs_ctx ); 684 eckey_restart_ctx *rs_ctx; in eckey_rs_alloc() local 690 rs_ctx = ctx; in eckey_rs_alloc() 691 mbedtls_ecdsa_restart_init( &rs_ctx->ecdsa_rs ); in eckey_rs_alloc() 692 mbedtls_ecdsa_init( &rs_ctx->ecdsa_ctx ); in eckey_rs_alloc() 700 eckey_restart_ctx *rs_ctx; in eckey_rs_free() local 705 rs_ctx = ctx; in eckey_rs_free() 706 mbedtls_ecdsa_restart_free( &rs_ctx->ecdsa_rs ); in eckey_rs_free() 707 mbedtls_ecdsa_free( &rs_ctx->ecdsa_ctx ); in eckey_rs_free() [all …]
|
D | pk_wrap.h | 65 void *rs_ctx ); 72 void *p_rng, void *rs_ctx ); 103 void (*rs_free_func)( void *rs_ctx );
|
D | ssl_tls12_client.c | 2405 void *rs_ctx = NULL; in ssl_parse_server_key_exchange() local 2515 rs_ctx = &ssl->handshake->ecrs_ctx.pk; in ssl_parse_server_key_exchange() 2536 md_alg, hash, hashlen, p, sig_len, rs_ctx ); in ssl_parse_server_key_exchange() 3406 void *rs_ctx = NULL; in ssl_write_certificate_verify() local 3496 rs_ctx = &ssl->handshake->ecrs_ctx.pk; in ssl_write_certificate_verify() 3504 ssl->conf->f_rng, ssl->conf->p_rng, rs_ctx ) ) != 0 ) in ssl_write_certificate_verify()
|
D | ssl_tls.c | 7058 void *rs_ctx ) in ssl_parse_certificate_verify() argument 7090 ((void) rs_ctx); in ssl_parse_certificate_verify() 7131 f_vrfy, p_vrfy, rs_ctx ); in ssl_parse_certificate_verify() 7322 void *rs_ctx = NULL; in mbedtls_ssl_parse_certificate() local 7392 rs_ctx = &ssl->handshake->ecrs_ctx; in mbedtls_ssl_parse_certificate() 7396 chain, rs_ctx ); in mbedtls_ssl_parse_certificate()
|
/mbedtls-3.4.0/tests/suites/ |
D | test_suite_ecdsa.function | 362 mbedtls_ecdsa_restart_ctx rs_ctx; 366 mbedtls_ecdsa_restart_init( &rs_ctx ); 377 hash->x, hash->len, sig->x, sig->len, &rs_ctx ); 390 hash->x, hash->len, sig->x, sig->len, &rs_ctx ); 399 hash->x, hash->len, sig->x, sig->len, &rs_ctx ); 409 hash->x, hash->len, sig->x, sig->len, &rs_ctx ); 415 mbedtls_ecdsa_restart_free( &rs_ctx ); 425 mbedtls_ecdsa_restart_ctx rs_ctx; 430 mbedtls_ecdsa_restart_init( &rs_ctx ); 444 mbedtls_test_rnd_std_rand, NULL, &rs_ctx ); [all …]
|
D | test_suite_pk.function | 533 mbedtls_pk_restart_ctx *rs_ctx = NULL; 537 rs_ctx = &ctx; 538 mbedtls_pk_restart_init( rs_ctx ); 559 result_str->x, mbedtls_pk_get_len( &pk ), rs_ctx ) == result ); 563 mbedtls_pk_restart_free( rs_ctx ); 673 mbedtls_pk_restart_ctx rs_ctx; 680 mbedtls_pk_restart_init( &rs_ctx ); 701 &rs_ctx ); 714 hash->x, hash->len, sig, slen, &rs_ctx ); 724 hash->x, hash->len, sig, slen, &rs_ctx ); [all …]
|
D | test_suite_x509parse.function | 563 mbedtls_x509_crt_restart_ctx rs_ctx; 578 mbedtls_x509_crt_restart_init( &rs_ctx ); 591 NULL, NULL, &rs_ctx ); 603 NULL, NULL, &rs_ctx ); 607 mbedtls_x509_crt_restart_free( &rs_ctx );
|
/mbedtls-3.4.0/include/mbedtls/ |
D | ecp.h | 396 mbedtls_ecp_restart_ctx *rs_ctx, 401 MBEDTLS_MPI_CHK( mbedtls_ecp_check_budget( grp, rs_ctx, \ 978 mbedtls_ecp_restart_ctx *rs_ctx ); 1064 mbedtls_ecp_restart_ctx *rs_ctx );
|
D | ecdsa.h | 358 mbedtls_ecdsa_restart_ctx *rs_ctx ); 425 mbedtls_ecdsa_restart_ctx *rs_ctx );
|
D | pk.h | 207 void * MBEDTLS_PRIVATE(rs_ctx); /**< Underlying restart context */ 470 mbedtls_pk_restart_ctx *rs_ctx ); 612 mbedtls_pk_restart_ctx *rs_ctx );
|
D | x509_crt.h | 811 mbedtls_x509_crt_restart_ctx *rs_ctx );
|