aboutsummaryrefslogtreecommitdiffstats
path: root/checks/pk.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-04-07 14:08:27 +0000
committerlloyd <[email protected]>2008-04-07 14:08:27 +0000
commit9ec64ce60cad6c825b7cf40306a359d019e2c13c (patch)
treeb6bbaab35eb09bf7148541baef89701ccefcfcce /checks/pk.cpp
parentab95931a8161005c8fd8aecc6f2f59d182b86de8 (diff)
Remove the Global_RNG namespace, along with rng.h and rng.cpp. This was
essentially a facade for the RNG object living in the global library state. Rewrite all callers to directly invoke the global state object: this makes it more clear what functions are actually accessing mutable state outside of the normal reference graph (and thus, which functions will have to be altered in order to remove this dependency). Other facades remain in place for the configuration object and the memory allocator factory.
Diffstat (limited to 'checks/pk.cpp')
-rw-r--r--checks/pk.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/checks/pk.cpp b/checks/pk.cpp
index f2c2401fd..afd8d61e4 100644
--- a/checks/pk.cpp
+++ b/checks/pk.cpp
@@ -21,7 +21,7 @@
#include <botan/numthry.h>
#include <botan/x931_rng.h>
-#include <botan/rng.h>
+#include <botan/libstate.h>
using namespace Botan;
#include "common.h"
@@ -194,7 +194,7 @@ u32bit do_pk_validation_tests(const std::string& filename)
global_state().set_prng(new ANSI_X931_RNG);
for(u32bit j = 0; j != 2; j++)
- Global_RNG::seed(true, 384);
+ global_state().seed_prng(true, 384);
do_pk_keygen_tests();
do_x509_tests();
@@ -249,7 +249,7 @@ void validate_encryption(PK_Encryptor* e, PK_Decryptor* d,
global_state().set_prng(new ANSI_X931_RNG);
for(u32bit j = 0; j != 2; j++)
- Global_RNG::seed(true, 384);
+ global_state().seed_prng(true, 384);
validate_decryption(d, algo, out, message, failure);
delete e;
@@ -290,7 +290,7 @@ void validate_signature(PK_Verifier* v, PK_Signer* s, const std::string& algo,
global_state().set_prng(new ANSI_X931_RNG);
for(u32bit j = 0; j != 2; j++)
- Global_RNG::seed(true, 384);
+ global_state().seed_prng(true, 384);
delete v;
delete s;