mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-09 13:35:41 +00:00
Fix direct use of struct instead of abstract type
This commit is contained in:
parent
ffd13996fd
commit
677b7f6c42
|
@ -580,7 +580,7 @@ static int uecc_eckey_verify_wrap( void *ctx, mbedtls_md_type_t md_alg,
|
|||
volatile int ret_fi;
|
||||
uint8_t signature[2*NUM_ECC_BYTES];
|
||||
unsigned char *p;
|
||||
const struct uECC_Curve_t * uecc_curve = uECC_secp256r1();
|
||||
uECC_Curve uecc_curve = uECC_secp256r1();
|
||||
const mbedtls_uecc_keypair *keypair = (const mbedtls_uecc_keypair *) ctx;
|
||||
|
||||
((void) md_alg);
|
||||
|
@ -704,7 +704,7 @@ static int uecc_eckey_sign_wrap( void *ctx, mbedtls_md_type_t md_alg,
|
|||
int (*f_rng)(void *, unsigned char *, size_t), void *p_rng )
|
||||
{
|
||||
const mbedtls_uecc_keypair *keypair = (const mbedtls_uecc_keypair *) ctx;
|
||||
const struct uECC_Curve_t * uecc_curve = uECC_secp256r1();
|
||||
uECC_Curve uecc_curve = uECC_secp256r1();
|
||||
int ret;
|
||||
|
||||
/*
|
||||
|
|
|
@ -3567,7 +3567,7 @@ static int ssl_out_client_key_exchange_write( mbedtls_ssl_context *ssl,
|
|||
== MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA )
|
||||
|
||||
{
|
||||
const struct uECC_Curve_t * uecc_curve = uECC_secp256r1();
|
||||
uECC_Curve uecc_curve = uECC_secp256r1();
|
||||
((void) n);
|
||||
((void) ret);
|
||||
|
||||
|
@ -3718,7 +3718,7 @@ static int ssl_out_client_key_exchange_write( mbedtls_ssl_context *ssl,
|
|||
== MBEDTLS_KEY_EXCHANGE_ECDHE_PSK )
|
||||
{
|
||||
#if defined(MBEDTLS_USE_TINYCRYPT)
|
||||
const struct uECC_Curve_t * uecc_curve = uECC_secp256r1();
|
||||
uECC_Curve uecc_curve = uECC_secp256r1();
|
||||
((void) n);
|
||||
((void) ret);
|
||||
|
||||
|
|
|
@ -3280,7 +3280,7 @@ static int ssl_prepare_server_key_exchange( mbedtls_ssl_context *ssl,
|
|||
#endif /* MBEDTLS_KEY_EXCHANGE__WITH_SERVER_SIGNATURE__ENABLED */
|
||||
#endif /* MBEDTLS_KEY_EXCHANGE__SOME_PFS__ENABLED */
|
||||
#if defined(MBEDTLS_USE_TINYCRYPT)
|
||||
const struct uECC_Curve_t * uecc_curve = uECC_secp256r1();
|
||||
uECC_Curve uecc_curve = uECC_secp256r1();
|
||||
#endif
|
||||
|
||||
(void) ciphersuite_info; /* unused in some configurations */
|
||||
|
|
|
@ -1973,7 +1973,7 @@ int mbedtls_ssl_build_pms( mbedtls_ssl_context *ssl )
|
|||
mbedtls_ssl_suite_get_key_exchange( ciphersuite_info )
|
||||
== MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA )
|
||||
{
|
||||
const struct uECC_Curve_t * uecc_curve = uECC_secp256r1();
|
||||
uECC_Curve uecc_curve = uECC_secp256r1();
|
||||
((void) ret);
|
||||
|
||||
if( !uECC_shared_secret( ssl->handshake->ecdh_peerkey,
|
||||
|
@ -2170,7 +2170,7 @@ int mbedtls_ssl_psk_derive_premaster( mbedtls_ssl_context *ssl, mbedtls_key_exch
|
|||
size_t zlen;
|
||||
|
||||
#if defined(MBEDTLS_USE_TINYCRYPT)
|
||||
const struct uECC_Curve_t * uecc_curve = uECC_secp256r1();
|
||||
uECC_Curve uecc_curve = uECC_secp256r1();
|
||||
((void) ret);
|
||||
|
||||
if( !uECC_shared_secret( ssl->handshake->ecdh_peerkey,
|
||||
|
|
|
@ -21,7 +21,7 @@ void test_ecdh()
|
|||
uint8_t secret1[NUM_ECC_BYTES] = {0};
|
||||
uint8_t secret2[NUM_ECC_BYTES] = {0};
|
||||
|
||||
const struct uECC_Curve_t * curve = uECC_secp256r1();
|
||||
uECC_Curve curve = uECC_secp256r1();
|
||||
|
||||
uECC_set_rng( &uecc_rng_wrapper );
|
||||
|
||||
|
@ -45,7 +45,7 @@ void test_ecdsa()
|
|||
uint8_t hash[NUM_ECC_BYTES] = {0};
|
||||
uint8_t sig[2*NUM_ECC_BYTES] = {0};
|
||||
|
||||
const struct uECC_Curve_t * curve = uECC_secp256r1();
|
||||
uECC_Curve curve = uECC_secp256r1();
|
||||
|
||||
uECC_set_rng( &uecc_rng_wrapper );
|
||||
|
||||
|
@ -64,7 +64,7 @@ void ecdh_primitive_testvec( data_t * private1, data_t * xA_str,
|
|||
data_t * yA_str, data_t * private2,
|
||||
data_t * xB_str, data_t * yB_str, data_t * z_str )
|
||||
{
|
||||
const struct uECC_Curve_t * curve = uECC_secp256r1();
|
||||
uECC_Curve curve = uECC_secp256r1();
|
||||
uint8_t public1[2*NUM_ECC_BYTES] = {0};
|
||||
uint8_t public2[2*NUM_ECC_BYTES] = {0};
|
||||
uint8_t secret1[NUM_ECC_BYTES] = {0};
|
||||
|
@ -90,7 +90,7 @@ void ecdh_primitive_testvec( data_t * private1, data_t * xA_str,
|
|||
void ecdsa_primitive_testvec( data_t * xQ_str, data_t * yQ_str,
|
||||
data_t * hash, data_t * r_str, data_t * s_str )
|
||||
{
|
||||
const struct uECC_Curve_t * curve = uECC_secp256r1();
|
||||
uECC_Curve curve = uECC_secp256r1();
|
||||
uint8_t pub_bytes[2*NUM_ECC_BYTES] = {0};
|
||||
uint8_t sig_bytes[2*NUM_ECC_BYTES] = {0};
|
||||
|
||||
|
|
Loading…
Reference in a new issue