// g++ -I ../../src -I /usr/include/opencryptoki cryptoki-demo.cpp ../../src/cryptoki.cxx -ldl -ggdb3 #include #include int main(int argc, char const*const*const argv) try { cryptoki::Init init(argc==2?argv[1]:"onepin-opensc-pkcs11.so"); cryptoki::Info inf(init.info()); std::cout<<"##################### INFO #####################"<slotinfo()); std::cout<<"##################### S-CARD #####################"<tokeninfo()); std::cout<<"--------------------- Token ----------------------"<mechanismlist()); for (cryptoki::MechanismList::iterator it2(mechs.begin()); it2!=mechs.end(); ++it2) { cryptoki::MechanismInfo mechinfo(it->mechanisminfo(*it2)); std::cout<<"-------------------- Mechanism -----------------"<