From 19d6bde221dcbe0df13e28a45a5eef4592ea38f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Tue, 20 May 2014 12:27:25 +0000 Subject: [PATCH] openssl version info to be desplayed in about (some nerves are blank after heartbleed); refs #30 --- src/openssl.hxx | 21 +++++++++++++++++++++ src/pcsc.hxx | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/openssl.hxx b/src/openssl.hxx index b57ca7f..3f30b2c 100644 --- a/src/openssl.hxx +++ b/src/openssl.hxx @@ -71,6 +71,27 @@ //! @ref gopenssl @copydoc gpcsc namespace openssl { + /// Get OpenSSL runtime and buildtime version information + /** To be displyed in an about box. It also shows mandatory license + information. */ + inline std::string version() { + std::string v + ((std::string(OPENSSL_VERSION_TEXT)==SSLeay_version(SSLEAY_VERSION)) + ? SSLeay_version(SSLEAY_VERSION) + : std::string(OPENSSL_VERSION_TEXT) + " (Buildtime)" + + "\n - Runtime: " + SSLeay_version(SSLEAY_VERSION)); + return v + + "\n - OpenSSL API "+SHLIB_VERSION_NUMBER+" compatible" + + "\n - " + SSLeay_version(SSLEAY_BUILT_ON) + + "\n - " + SSLeay_version(SSLEAY_PLATFORM) + + "\n\n" + "This product includes software developed by the OpenSSL Project" + " for use in the OpenSSL Toolkit (http://www.openssl.org/)" + "\n\n" + "This product includes cryptographic software written by Eric Young" + " (eay@cryptsoft.com)"; + } + //============================================================================ //! @addtogroup opensslexceptions //@{ diff --git a/src/pcsc.hxx b/src/pcsc.hxx index 0f1cb14..87d9b7a 100644 --- a/src/pcsc.hxx +++ b/src/pcsc.hxx @@ -495,7 +495,7 @@ namespace pcsc { try { if (crypto::hex(c.reader(*it)->status().atr).find(atr) !=string::npos) - CRYPTOLOG("found reader: "<<*it); + CRYPTOLOG("found reader: "<<(*it)); res.push_back(*it); } catch (std::exception& x) { // ignore unusable readers CRYPTOLOG("ignored unusable reader: "<