From 372e7a3268338d4c0c5c6dfa803f7a129be703a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Fri, 15 Apr 2011 06:52:18 +0000 Subject: [PATCH] better logging in PCSC and first engine release; refs #11 --- doc/examples/openssl-engine-demo.cxx | 37 ++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 doc/examples/openssl-engine-demo.cxx diff --git a/doc/examples/openssl-engine-demo.cxx b/doc/examples/openssl-engine-demo.cxx new file mode 100644 index 0000000..9b626ad --- /dev/null +++ b/doc/examples/openssl-engine-demo.cxx @@ -0,0 +1,37 @@ +/*! @file + + @id $Id$ +*/ +// 1 2 3 4 5 6 7 8 +// 45678901234567890123456789012345678901234567890123456789012345678901234567890 + +#include + +#include + +class TestEngine: virtual public openssl::Engine { + + public: + + virtual const char* id() { + OPENSSL_LOG("log"); + return "TestEngine_ID"; + } + virtual const char* name() { + OPENSSL_LOG("log"); + return "TestEngine_NAME"; + } +}; + +int main(int, char**) { + { + openssl::RegisterEngine testEngine(new TestEngine); + + for (ENGINE* e(ENGINE_get_first()); e; e = ENGINE_get_next(e)) { + std::cout<<"Found Engine: "<