aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/self_sig.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'doc/examples/self_sig.cpp')
-rw-r--r--doc/examples/self_sig.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/examples/self_sig.cpp b/doc/examples/self_sig.cpp
index d00bcb3b4..c2118be40 100644
--- a/doc/examples/self_sig.cpp
+++ b/doc/examples/self_sig.cpp
@@ -13,6 +13,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>
@@ -39,9 +40,9 @@ int main(int argc, char* argv[])
return 1;
}
- try {
- RSA_PrivateKey key(1024);
- //DSA_PrivateKey key(DL_Group("dsa/jce/1024"));
+ try
+ {
+ RSA_PrivateKey key(1024, global_state().prng_reference());
std::ofstream priv_key("private.pem");
priv_key << PKCS8::PEM_encode(key, argv[1]);