diff --git a/doc/examples/makefile.am b/doc/examples/makefile.am index 1bcef3c..94eb925 100644 --- a/doc/examples/makefile.am +++ b/doc/examples/makefile.am @@ -5,7 +5,7 @@ noinst_PROGRAMS = pcsc-demo cryptoki-sign-demo cryptoki-demo \ openssl-tcp-demo openssl-ssl-demo \ - openssl-engine-demo + openssl-engine-demo suisse-id-demo AM_CPPFLAGS += -I/usr/include/PCSC @@ -70,4 +70,12 @@ if MINGW32 openssl_engine_demo_LDADD += /opt/local/i586-mingw32msvc/lib/ssleay32.a /opt/local/i586-mingw32msvc/lib/libeay32.a endif +suisse_id_demo_SOURCES = suisse-id-demo.cxx +suisse_id_demo_CPPFLAGS = -I${top_srcdir}/src -I/usr/include/PCSC +suisse_id_demo_LDFLAGS = -L${top_builddir}/src +suisse_id_demo_LDADD = -lpcscxx +if MINGW32 +suisse_id_demo_LDADD += /opt/local/i586-mingw32msvc/lib/ssleay32.a /opt/local/i586-mingw32msvc/lib/libeay32.a +endif + MAINTAINERCLEANFILES = makefile.in diff --git a/doc/examples/suisse-id-demo.cxx b/doc/examples/suisse-id-demo.cxx new file mode 100644 index 0000000..a4d8e21 --- /dev/null +++ b/doc/examples/suisse-id-demo.cxx @@ -0,0 +1,48 @@ +/*! @file + + @id $Id$ +*/ +// 1 2 3 4 5 6 7 8 +// 45678901234567890123456789012345678901234567890123456789012345678901234567890 + +#include +#include +#include +#include + +#include +#include + +int main(int argc, char** argv) try { + + std::string lib("libcvP11.so"); + mrw::args::parse(argc, argv, + "Sign a text (optionally several times for performance" + " measurements).", + mrw::args::list() + <status().atr.find(atr)!=string::npos) + if (crypto::hex(reader(*it).status().atr).find(atr)!=string::npos) res.push_back(*it); return res; }