summaryrefslogtreecommitdiffstats
path: root/src/mbedTLS++/CryptoKey.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbedTLS++/CryptoKey.cpp')
-rw-r--r--src/mbedTLS++/CryptoKey.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/mbedTLS++/CryptoKey.cpp b/src/mbedTLS++/CryptoKey.cpp
index d9f04e20f..742d9c73c 100644
--- a/src/mbedTLS++/CryptoKey.cpp
+++ b/src/mbedTLS++/CryptoKey.cpp
@@ -124,14 +124,15 @@ int cCryptoKey::ParsePrivate(const void * a_Data, size_t a_NumBytes, const AStri
if (a_Password.empty())
{
- return mbedtls_pk_parse_key(&m_Pk, reinterpret_cast<const unsigned char *>(keyData.data()), a_NumBytes + 1, nullptr, 0);
+ return mbedtls_pk_parse_key(&m_Pk, reinterpret_cast<const unsigned char *>(keyData.data()), a_NumBytes + 1, nullptr, 0, mbedtls_ctr_drbg_random, m_CtrDrbg.GetInternal());
}
else
{
return mbedtls_pk_parse_key(
&m_Pk,
reinterpret_cast<const unsigned char *>(keyData.data()), a_NumBytes + 1,
- reinterpret_cast<const unsigned char *>(a_Password.c_str()), a_Password.size()
+ reinterpret_cast<const unsigned char *>(a_Password.c_str()), a_Password.size(),
+ mbedtls_ctr_drbg_random, m_CtrDrbg.GetInternal()
);
}
}
@@ -144,7 +145,3 @@ bool cCryptoKey::IsValid(void) const
{
return (mbedtls_pk_get_type(&m_Pk) != MBEDTLS_PK_NONE);
}
-
-
-
-