aboutsummaryrefslogtreecommitdiffstats
path: root/checks
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-06-20 11:32:06 +0000
committerlloyd <[email protected]>2008-06-20 11:32:06 +0000
commit8f32a90b0aa6ab873c1d5337947e3642c640e3a4 (patch)
tree05a0bddb2a7174d666e91075a81b5ed4642eac62 /checks
parent79c7591a0946bb20fd50de136970cc0b1454430a (diff)
Use RNG& argument for PKCS8::encrypt_key and PKCS8::PEM_encode
Diffstat (limited to 'checks')
-rw-r--r--checks/x509.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/checks/x509.cpp b/checks/x509.cpp
index d1aebe059..48cbd8384 100644
--- a/checks/x509.cpp
+++ b/checks/x509.cpp
@@ -47,13 +47,14 @@ u64bit key_id(const Public_Key* key)
u32bit check_against_copy(const Private_Key& orig)
{
- Private_Key* copy_priv = PKCS8::copy_key(orig, global_state().prng_reference());
+ RandomNumberGenerator& rng = global_state().prng_reference();
+
+ Private_Key* copy_priv = PKCS8::copy_key(orig, rng);
Public_Key* copy_pub = X509::copy_key(orig);
- const std::string passphrase= "I need work! -Mr. T"; // Me too...
- DataSource_Memory enc_source(PKCS8::PEM_encode(orig, passphrase));
- Private_Key* copy_priv_enc = PKCS8::load_key(enc_source,
- global_state().prng_reference(),
+ const std::string passphrase= "I need work! -Mr. T";
+ DataSource_Memory enc_source(PKCS8::PEM_encode(orig, rng, passphrase));
+ Private_Key* copy_priv_enc = PKCS8::load_key(enc_source, rng,
passphrase);
u64bit orig_id = key_id(&orig);