Skip to content

Commit e114d73

Browse files
committed
FIX: warning: incompatible pointer types
1 parent c58fba2 commit e114d73

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/core/n-crypt.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ static int myrand(void *rng_state, unsigned char *output, size_t len)
772772
mbedtls_ecdh_init(ctx_ecdh);
773773
err = mbedtls_ecdh_setup(ctx_ecdh, gid);
774774
if (err) goto failed_init;
775-
mbed = &ctx_ecdh->MBEDTLS_PRIVATE(ctx);
775+
mbed = &ctx_ecdh->MBEDTLS_PRIVATE(ctx).private_mbed_ecdh;
776776
err = mbedtls_ecp_point_read_binary(
777777
&mbed->MBEDTLS_PRIVATE(grp),
778778
&mbed->MBEDTLS_PRIVATE(Q),
@@ -795,7 +795,7 @@ static int myrand(void *rng_state, unsigned char *output, size_t len)
795795
}
796796

797797
if (ref_sign) {
798-
mbed = &ctx_ecdh->MBEDTLS_PRIVATE(ctx);
798+
mbed = &ctx_ecdh->MBEDTLS_PRIVATE(ctx).private_mbed_ecdh;
799799
mbedtls_mpi_init(&r);
800800
mbedtls_mpi_init(&s);
801801
err = mbedtls_ecp_gen_keypair(
@@ -823,7 +823,7 @@ static int myrand(void *rng_state, unsigned char *output, size_t len)
823823
BIN_LEN(bin) = len;
824824
}
825825
if (ref_verify) {
826-
mbed = &ctx_ecdh->MBEDTLS_PRIVATE(ctx);
826+
mbed = &ctx_ecdh->MBEDTLS_PRIVATE(ctx).private_mbed_ecdh;
827827
unsigned char *p = VAL_BIN_AT(val_sign);
828828
const unsigned char *end = VAL_BIN_TAIL(val_sign);
829829
mbedtls_mpi_init(&r);

0 commit comments

Comments
 (0)