aboutsummaryrefslogtreecommitdiffstats
path: root/checks/x509.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-06-27 17:00:56 +0000
committerlloyd <[email protected]>2008-06-27 17:00:56 +0000
commit89382c8d6e8861e702def6a6e695fc2b783e7f09 (patch)
treee479233393d84ee88c5ae2f08889f7117e8da911 /checks/x509.cpp
parent09d2b6df9a2a680476160a6a0a56c4b4f2fb91aa (diff)
Remove uses of global PRNG from self-test and benchmark code. Assumes
access to /dev/random (will be cleaned up shortly)
Diffstat (limited to 'checks/x509.cpp')
-rw-r--r--checks/x509.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/checks/x509.cpp b/checks/x509.cpp
index 015b050f6..3c802356b 100644
--- a/checks/x509.cpp
+++ b/checks/x509.cpp
@@ -6,14 +6,13 @@
#include <botan/pkcs10.h>
#include <botan/rsa.h>
#include <botan/dsa.h>
-
-#include <botan/libstate.h>
using namespace Botan;
#include <iostream>
#include <memory>
#include "validate.h"
+#include "common.h"
X509_Cert_Options ca_opts();
X509_Cert_Options req_opts1();
@@ -47,7 +46,7 @@ u64bit key_id(const Public_Key* key)
u32bit check_against_copy(const Private_Key& orig)
{
- RandomNumberGenerator& rng = global_state().prng_reference();
+ RandomNumberGenerator& rng = global_rng();
Private_Key* copy_priv = PKCS8::copy_key(orig, rng);
Public_Key* copy_pub = X509::copy_key(orig);
@@ -78,7 +77,7 @@ u32bit check_against_copy(const Private_Key& orig)
void do_x509_tests()
{
- RandomNumberGenerator& rng = global_state().prng_reference();
+ RandomNumberGenerator& rng = global_rng();
std::cout << "Testing X.509 CA/CRL/cert/cert request: " << std::flush;