move openssl::version to cxx file due to link problems
This commit is contained in:
@@ -16,7 +16,7 @@ EXTRA_DIST = ${top_srcdir}/src/overview.cxx
|
|||||||
lib_LTLIBRARIES = libpcscxx.la
|
lib_LTLIBRARIES = libpcscxx.la
|
||||||
|
|
||||||
libpcscxx_la_SOURCES = cryptoki.cxx cryptoki.hxx pcsc.cxx version.cxx \
|
libpcscxx_la_SOURCES = cryptoki.cxx cryptoki.hxx pcsc.cxx version.cxx \
|
||||||
openssl-engine.cxx
|
openssl.cxx openssl-engine.cxx
|
||||||
libpcscxx_la_LDFLAGS = -version-info ${LIB_VERSION}
|
libpcscxx_la_LDFLAGS = -version-info ${LIB_VERSION}
|
||||||
|
|
||||||
bin_PROGRAMS =
|
bin_PROGRAMS =
|
||||||
|
@@ -5,6 +5,9 @@
|
|||||||
// 1 2 3 4 5 6 7 8
|
// 1 2 3 4 5 6 7 8
|
||||||
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
|
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
|
||||||
|
|
||||||
|
#ifndef OPENSSL_COMPATIBILITY_HXX
|
||||||
|
#define OPENSSL_COMPATIBILITY_HXX
|
||||||
|
|
||||||
#undef DATADIR
|
#undef DATADIR
|
||||||
#include <openssl/opensslv.h>
|
#include <openssl/opensslv.h>
|
||||||
#ifndef OPENSSL_VERSION_NUMBER
|
#ifndef OPENSSL_VERSION_NUMBER
|
||||||
@@ -50,34 +53,17 @@
|
|||||||
#include <openssl/dsa.h>
|
#include <openssl/dsa.h>
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
#include <openssl/ossl_typ.h>
|
#include <openssl/ossl_typ.h>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
namespace openssl {
|
namespace openssl {
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
//! @addtogroup opensslcompat
|
//! @addtogroup opensslcompat
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/// Get OpenSSL runtime and buildtime version information
|
/// Get OpenSSL runtime and buildtime version information
|
||||||
/** To be displyed in an about box. It also shows mandatory license
|
/** To be displyed in an about box. It also shows mandatory license
|
||||||
information. */
|
information. */
|
||||||
inline std::string version() {
|
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)";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||||
@@ -762,3 +748,5 @@ inline int RSA_meth_set_keygen(RSA_METHOD *meth,
|
|||||||
//@}
|
//@}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
37
src/openssl.cxx
Normal file
37
src/openssl.cxx
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
/*! @file
|
||||||
|
|
||||||
|
@id $Id$
|
||||||
|
*/
|
||||||
|
// 1 2 3 4 5 6 7 8
|
||||||
|
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
|
||||||
|
|
||||||
|
#include <openssl-compatibility.hxx>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace openssl {
|
||||||
|
|
||||||
|
//==============================================================================
|
||||||
|
//! @addtogroup opensslcompat
|
||||||
|
//@{
|
||||||
|
/// Get OpenSSL runtime and buildtime version information
|
||||||
|
/** To be displyed in an about box. It also shows mandatory license
|
||||||
|
information. */
|
||||||
|
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)";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Reference in New Issue
Block a user