diff options
| author | 2011-02-11 13:22:22 +0000 | |
|---|---|---|
| committer | 2011-02-11 13:22:22 +0000 | |
| commit | d07b987622bfc9fd13398ab412cd847541193c09 (patch) | |
| tree | db5290a5141e36439d520efad560ff07fe940014 /src/modules/str/libkvistr.cpp | |
| parent | added turkish translation (diff) | |
| download | KVIrc-d07b987622bfc9fd13398ab412cd847541193c09.tar.gz KVIrc-d07b987622bfc9fd13398ab412cd847541193c09.tar.bz2 KVIrc-d07b987622bfc9fd13398ab412cd847541193c09.zip | |
Don't make Crypto++ and OpenSSL support mutally exclusive.
This allows using SSL encrypted connections and still use Crypto++ for
the remaining cryptographic functions.
Signed-off-by: Kai Wasserbäch <curan@debian.org>
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@5466 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/str/libkvistr.cpp')
| -rw-r--r-- | src/modules/str/libkvistr.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/modules/str/libkvistr.cpp b/src/modules/str/libkvistr.cpp index 668fc8996..18556ac5c 100644 --- a/src/modules/str/libkvistr.cpp +++ b/src/modules/str/libkvistr.cpp @@ -38,12 +38,14 @@ #include <QRegExp> #include <QClipboard> -#if defined( COMPILE_SSL_SUPPORT ) +#ifdef COMPILE_SSL_SUPPORT // The current implementation #include <KviSSL.h> #include <openssl/evp.h> #include <openssl/pem.h> -#elif defined(COMPILE_CRYPTOPP_SUPPORT) +#endif + +#ifdef COMPILE_CRYPTOPP_SUPPORT // The preferred new implementation (until QCryptographicHash supports all // hashes we want). // As Crypto++ is concerned for security they warn about MD5 and friends, @@ -76,7 +78,9 @@ ); return szDigest; } -#else +#endif + +#if !defined(COMPILE_SSL_SUPPORT) && !defined(COMPILE_CRYPTOPP_SUPPORT) // The fallback we can always use, but with very limited set of // functionality. #include <QCryptographicHash> @@ -1371,7 +1375,7 @@ static bool str_kvs_fnc_digest(KviKvsModuleFunctionCall * c) KVSM_PARAMETER("algorithm",KVS_PT_NONEMPTYSTRING,KVS_PF_OPTIONAL,szType) KVSM_PARAMETERS_END(c) -#if defined(COMPILE_SSL_SUPPORT) +#if defined(COMPILE_SSL_SUPPORT) && !defined(COMPILE_CRYPTOPP_SUPPORT) if(szType.isEmpty()) szType = "md5"; EVP_MD_CTX mdctx; |
