diff options
author | lloyd <[email protected]> | 2008-06-20 11:24:33 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-06-20 11:24:33 +0000 |
commit | 79c7591a0946bb20fd50de136970cc0b1454430a (patch) | |
tree | 4efe62dfcd3f786970cf24062d06061275aead86 /checks/pk.cpp | |
parent | 850af952f95a3115e509ebd0aa6689a1d2e9c810 (diff) |
Convert pkcs8_decoder() and x509_decoder() to take a RandomNumberGenerator&
reference, along with PKCS8::load_key
get_pbe no longer calls new_params() on the newly instantiated instance,
which is not backwards compatible (you have to either call new_params
yourself, or explicitly set the iteration count, salt, etc)
Diffstat (limited to 'checks/pk.cpp')
-rw-r--r-- | checks/pk.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/checks/pk.cpp b/checks/pk.cpp index 12b675430..8498c8291 100644 --- a/checks/pk.cpp +++ b/checks/pk.cpp @@ -151,7 +151,9 @@ u32bit validate_rsa_enc_pkcs8(const std::string& algo, DataSource_Memory keysource(reinterpret_cast<const byte*>(str[0].c_str()), str[0].length()); - Private_Key* privkey = PKCS8::load_key(keysource, pass); + Private_Key* privkey = PKCS8::load_key(keysource, + global_state().prng_reference(), + pass); RSA_PrivateKey* rsapriv = dynamic_cast<RSA_PrivateKey*>(privkey); if(!rsapriv) @@ -346,7 +348,9 @@ u32bit validate_dsa_sig(const std::string& algo, DataSource_Memory keysource(reinterpret_cast<const byte*>(str[0].c_str()), str[0].length()); - Private_Key* privkey = PKCS8::load_key(keysource, pass); + Private_Key* privkey = PKCS8::load_key(keysource, + global_state().prng_reference(), + pass); DSA_PrivateKey* dsapriv = dynamic_cast<DSA_PrivateKey*>(privkey); if(!dsapriv) |