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.
21 lines
836 B
21 lines
836 B
16 years ago
|
//g++ -I ../svn -I /usr/include/PCSC test.cpp -lpcsclite -ggdb3
|
||
16 years ago
|
#include <pcsc.hxx>
|
||
16 years ago
|
#include <iostream>
|
||
|
|
||
|
int main(int, char const*const*const argv) try {
|
||
11 years ago
|
pcsc::Connection::Strings reader(pcsc::Connection::scan());
|
||
15 years ago
|
std::cout<<"Library-Version: "<<pcsc::version()<<std::endl;
|
||
16 years ago
|
std::cout<<"Suche PCSC-Reader ..."<<std::endl;
|
||
|
if (!reader.size()) std::cout<<"Keine gefunden."<<std::endl;
|
||
|
for (pcsc::Connection::Strings::const_iterator it(reader.begin());
|
||
|
it!=reader.end(); ++it) {
|
||
|
std::cout<<"Reader: "<<*it<<std::endl;
|
||
11 years ago
|
pcsc::Connection::Reader::Status s(pcsc::Connection::reader(*it)->status());
|
||
16 years ago
|
std::cout<<"Status = "<<s.state<<std::endl;
|
||
15 years ago
|
std::cout<<"ATR = "<<crypto::hex(s.atr)<<std::endl;
|
||
16 years ago
|
}
|
||
|
return 0;
|
||
|
} catch (std::exception& x) {
|
||
|
std::cerr<<"**** FEHLER in "<<*argv<<": "<<x.what()<<std::endl;
|
||
|
}
|