better logging in PCSC and first engine release; refs #11
This commit is contained in:
37
doc/examples/openssl-engine-demo.cxx
Normal file
37
doc/examples/openssl-engine-demo.cxx
Normal file
@@ -0,0 +1,37 @@
|
||||
/*! @file
|
||||
|
||||
@id $Id$
|
||||
*/
|
||||
// 1 2 3 4 5 6 7 8
|
||||
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
|
||||
|
||||
#include <openssl-engine.hxx>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
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: "<<ENGINE_get_id(e)<<std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
ENGINE_cleanup();
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user