This library provides a simple and nice C++ wrapper around these libraries, so that programmers can concentrate on functionality. It offers general support for PCSC-lite, OpenSSL, PKCS#11, plus specific functionality for the SuisseID.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
772 B
38 lines
772 B
14 years ago
|
/*! @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() {
|
||
11 years ago
|
CRYPTOLOG("log");
|
||
14 years ago
|
return "TestEngine_ID";
|
||
|
}
|
||
|
virtual const char* name() {
|
||
11 years ago
|
CRYPTOLOG("log");
|
||
14 years ago
|
return "TestEngine_NAME";
|
||
|
}
|
||
|
};
|
||
|
|
||
|
int main(int, char**) {
|
||
|
{
|
||
14 years ago
|
openssl::RegisterEngine<> testEngine(new TestEngine);
|
||
14 years ago
|
|
||
|
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;
|
||
|
}
|