added version info, refs #4
This commit is contained in:
@@ -14,6 +14,7 @@ int main(int argc, char const*const*const argv) try {
|
||||
// print(v);
|
||||
cryptoki::Init init(argc==2?argv[1]:"onepin-opensc-pkcs11.so");
|
||||
cryptoki::Info inf(init.info());
|
||||
std::cout<<"Library-Version: "<<pcsc::version()<<std::endl;
|
||||
std::cout<<"##################### INFO #####################"<<std::endl
|
||||
<<"cryptokiVersion: \""<<(int)inf.cryptokiVersion.major
|
||||
<<'.'<<(int)inf.cryptokiVersion.minor<<'"'<<std::endl
|
||||
|
@@ -11,10 +11,12 @@ AM_CPPFLAGS += -I/usr/include/PCSC
|
||||
endif
|
||||
|
||||
pcsc_demo_SOURCES = pcsc-demo.cxx
|
||||
pcsc_demo_LDFLAGS = -L${top_builddir}/src
|
||||
pcsc_demo_LDADD = -lcryptoki++
|
||||
if MINGW32
|
||||
pcsc_demo_LDADD = /opt/local/i586-mingw32msvc/lib/winscard.a
|
||||
pcsc_demo_LDADD += /opt/local/i586-mingw32msvc/lib/winscard.a
|
||||
else
|
||||
pcsc_demo_LDADD = -lpcsclite -lpthread
|
||||
pcsc_demo_LDADD += -lpcsclite -ldl -lpthread
|
||||
endif
|
||||
|
||||
cryptoki_demo_SOURCES = cryptoki-demo.cxx
|
||||
@@ -28,18 +30,20 @@ endif
|
||||
|
||||
openssl_tcp_demo_SOURCES = openssl-tcp-demo.cxx
|
||||
openssl_tcp_demo_LDFLAGS = -L${top_builddir}/src
|
||||
openssl_tcp_demo_LDADD = -lcryptoki++
|
||||
if MINGW32
|
||||
openssl_tcp_demo_LDADD = /opt/local/i586-mingw32msvc/lib/ssleay32.a /opt/local/i586-mingw32msvc/lib/libeay32.a
|
||||
openssl_tcp_demo_LDADD += /opt/local/i586-mingw32msvc/lib/ssleay32.a /opt/local/i586-mingw32msvc/lib/libeay32.a
|
||||
else
|
||||
openssl_tcp_demo_LDADD = -ldl -lpthread -lssl
|
||||
openssl_tcp_demo_LDADD += -ldl -lpthread -lssl
|
||||
endif
|
||||
|
||||
openssl_ssl_demo_SOURCES = openssl-ssl-demo.cxx
|
||||
openssl_ssl_demo_LDFLAGS = -L${top_builddir}/src
|
||||
openssl_ssl_demo_LDADD = -lcryptoki++
|
||||
if MINGW32
|
||||
openssl_ssl_demo_LDADD = /opt/local/i586-mingw32msvc/lib/ssleay32.a /opt/local/i586-mingw32msvc/lib/libeay32.a
|
||||
openssl_ssl_demo_LDADD += /opt/local/i586-mingw32msvc/lib/ssleay32.a /opt/local/i586-mingw32msvc/lib/libeay32.a
|
||||
else
|
||||
openssl_ssl_demo_LDADD = -ldl -lpthread -lssl
|
||||
openssl_ssl_demo_LDADD += -ldl -lpthread -lssl
|
||||
endif
|
||||
|
||||
MAINTAINERCLEANFILES = makefile.in
|
||||
|
@@ -14,6 +14,7 @@ int main(int argc, char** argv) try {
|
||||
std::string host(argc>1?argv[1]:"dev.swisssign.com");
|
||||
std::string port(argc>2?argv[2]:"443");
|
||||
std::string path(argc>3?argv[3]:"/");
|
||||
std::cout<<"Library-Version: "<<pcsc::version()<<std::endl;
|
||||
std::cout<<"Connect to: "<<host<<':'<<port<<std::endl;
|
||||
openssl::SSL ssl
|
||||
(openssl::TrustStore("/usr/lib/ssl/certs/SwissSign_Gold_CA_-_G2.pem"));
|
||||
|
@@ -13,6 +13,7 @@ int main(int argc, char** argv) try {
|
||||
openssl::Init init;
|
||||
std::string host(argc>1?argv[1]:"swisssign.com");
|
||||
std::string port(argc>2?argv[2]:"80");
|
||||
std::cout<<"Library-Version: "<<pcsc::version()<<std::endl;
|
||||
std::cout<<"Connect to: "<<host<<':'<<port<<std::endl;
|
||||
openssl::TCP ssl(host+':'+port);
|
||||
ssl<<"GET / HTTP/1.1\x0D\x0AHost: "<<host
|
||||
|
@@ -5,6 +5,7 @@
|
||||
int main(int, char const*const*const argv) try {
|
||||
pcsc::Connection c;
|
||||
pcsc::Connection::Strings reader(c.scan());
|
||||
std::cout<<"Library-Version: "<<pcsc::version()<<std::endl;
|
||||
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());
|
||||
|
Reference in New Issue
Block a user