aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/pkcs10.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-05-24 18:47:11 +0000
committerlloyd <[email protected]>2008-05-24 18:47:11 +0000
commitc4bad5476b30811ad51b1edd3bd873864d423c07 (patch)
tree94679d6cee3a38da1d64b8f5f671986566ac8a18 /doc/examples/pkcs10.cpp
parentebc67ae27481549a152858f24fff4a7a82ad4e51 (diff)
Avoid using the global RNG in check_key, instead pass a reference.
Update the examples
Diffstat (limited to 'doc/examples/pkcs10.cpp')
-rw-r--r--doc/examples/pkcs10.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/examples/pkcs10.cpp b/doc/examples/pkcs10.cpp
index a4f6efb04..7e374ad72 100644
--- a/doc/examples/pkcs10.cpp
+++ b/doc/examples/pkcs10.cpp
@@ -11,6 +11,7 @@ This file is in the public domain
#include <botan/x509self.h>
#include <botan/rsa.h>
#include <botan/dsa.h>
+#include <botan/libstate.h>
using namespace Botan;
#include <iostream>
@@ -25,8 +26,9 @@ int main(int argc, char* argv[])
return 1;
}
- try {
- RSA_PrivateKey priv_key(1024);
+ try
+ {
+ RSA_PrivateKey priv_key(1024, global_state().prng_reference());
// If you want a DSA key instead of RSA, comment out the above line and
// uncomment this one:
//DSA_PrivateKey priv_key(DL_Group("dsa/jce/1024"));