mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-30 13:01:23 +03:00
mbedtls: Use getter for ssh_mbedtls_ctr_drbg
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -30,6 +30,9 @@
|
||||
#ifdef HAVE_LIBMBEDCRYPTO
|
||||
#include <mbedtls/md.h>
|
||||
|
||||
static mbedtls_entropy_context ssh_mbedtls_entropy;
|
||||
static mbedtls_ctr_drbg_context ssh_mbedtls_ctr_drbg;
|
||||
|
||||
struct ssh_mac_ctx_struct {
|
||||
enum ssh_mac_e mac_type;
|
||||
mbedtls_md_context_t ctx;
|
||||
@@ -999,6 +1002,11 @@ int ssh_mbedtls_random(void *where, int len, int strong)
|
||||
return !rc;
|
||||
}
|
||||
|
||||
mbedtls_ctr_drbg_context *ssh_get_mbedtls_ctr_drbg_context(void)
|
||||
{
|
||||
return &ssh_mbedtls_ctr_drbg;
|
||||
}
|
||||
|
||||
void ssh_crypto_finalize(void)
|
||||
{
|
||||
if (!libmbedcrypto_initialized) {
|
||||
|
||||
Reference in New Issue
Block a user