1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-08-05 20:55:46 +03:00

mbedtls: Use getter for ssh_mbedtls_ctr_drbg

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Andreas Schneider
2018-08-20 15:56:14 +02:00
parent 1d9f548204
commit 85d2c0371a
5 changed files with 62 additions and 25 deletions

View File

@@ -81,8 +81,10 @@ int ssh_mbedcry_rand(bignum rnd, int bits, int top, int bottom)
}
len = bits / 8 + 1;
rc = mbedtls_mpi_fill_random(rnd, len, mbedtls_ctr_drbg_random,
&ssh_mbedtls_ctr_drbg);
rc = mbedtls_mpi_fill_random(rnd,
len,
mbedtls_ctr_drbg_random,
ssh_get_mbedtls_ctr_drbg_context());
if (rc != 0) {
return 0;
}