aboutsummaryrefslogtreecommitdiffstats
path: root/src/x509_key.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-06-20 11:24:33 +0000
committerlloyd <[email protected]>2008-06-20 11:24:33 +0000
commit79c7591a0946bb20fd50de136970cc0b1454430a (patch)
tree4efe62dfcd3f786970cf24062d06061275aead86 /src/x509_key.cpp
parent850af952f95a3115e509ebd0aa6689a1d2e9c810 (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 'src/x509_key.cpp')
-rw-r--r--src/x509_key.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/x509_key.cpp b/src/x509_key.cpp
index 09044d492..f327aac16 100644
--- a/src/x509_key.cpp
+++ b/src/x509_key.cpp
@@ -11,6 +11,7 @@
#include <botan/pk_algs.h>
#include <botan/oids.h>
#include <botan/pem.h>
+#include <botan/libstate.h>
#include <memory>
namespace Botan {
@@ -97,7 +98,9 @@ Public_Key* load_key(DataSource& source)
throw Decoding_Error("Unknown PK algorithm/OID: " + alg_name + ", " +
alg_id.oid.as_string());
- std::auto_ptr<X509_Decoder> decoder(key_obj->x509_decoder());
+ std::auto_ptr<X509_Decoder> decoder(
+ key_obj->x509_decoder(global_state().prng_reference()));
+
if(!decoder.get())
throw Decoding_Error("Key does not support X.509 decoding");