diff options
author | lloyd <[email protected]> | 2008-10-08 03:15:34 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-10-08 03:15:34 +0000 |
commit | 8343194ea16297eb3e51627eb3f35c529850c6f8 (patch) | |
tree | 22aeac286d2cbbdbe8790b08e4187d369f3c4efb /doc/examples/cms_dec.cpp | |
parent | be5e48619a63559ad777396d69cc8cc95ef0af15 (diff) |
Update examples for recent API changes
Diffstat (limited to 'doc/examples/cms_dec.cpp')
-rw-r--r-- | doc/examples/cms_dec.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/examples/cms_dec.cpp b/doc/examples/cms_dec.cpp index 593cf2e09..08d43e7b8 100644 --- a/doc/examples/cms_dec.cpp +++ b/doc/examples/cms_dec.cpp @@ -1,7 +1,10 @@ +#include <botan/botan.h> +#include <botan/pkcs8.h> #include <botan/cms_dec.h> using namespace Botan; #include <iostream> +#include <memory> int main(int argc, char* argv[]) { @@ -14,8 +17,11 @@ int main(int argc, char* argv[]) LibraryInitializer init; try { + std::auto_ptr<RandomNumberGenerator> rng( + RandomNumberGenerator::make_rng()); + X509_Certificate mycert("mycert.pem"); - PKCS8_PrivateKey* mykey = PKCS8::load_key("mykey.pem", "cut"); + PKCS8_PrivateKey* mykey = PKCS8::load_key("mykey.pem", *rng, "cut"); X509_Certificate yourcert("yourcert.pem"); X509_Certificate cacert("cacert.pem"); |