aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
authorGravatar Fabio Bas2011-02-06 17:34:43 +0000
committerGravatar Fabio Bas2011-02-06 17:34:43 +0000
commit54bfba29d6948b68e070bb822a09e1f0214b1cb3 (patch)
treeaa62386b8d082d098ef9098b7901b105cbe5ed78 /src/modules
parentHopefully sort out the focusing/window placement issues (diff)
downloadKVIrc-54bfba29d6948b68e070bb822a09e1f0214b1cb3.tar.gz
KVIrc-54bfba29d6948b68e070bb822a09e1f0214b1cb3.tar.bz2
KVIrc-54bfba29d6948b68e070bb822a09e1f0214b1cb3.zip
fixed compilation of fish module without openssl
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@5425 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/fish/libkvifish.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/modules/fish/libkvifish.cpp b/src/modules/fish/libkvifish.cpp
index 3365df133..004502afe 100644
--- a/src/modules/fish/libkvifish.cpp
+++ b/src/modules/fish/libkvifish.cpp
@@ -103,7 +103,7 @@
return true;
#else
- c->warning(__tr2qs("FiSH has been compiled without ssl support, unable to proceed"));
+ qDebug("%s",__tr2qs("FiSH has been compiled without ssl support, unable to proceed").toUtf8().data());
return false;
#endif
}
@@ -190,6 +190,9 @@
return false;
}
+ KviCString szFinalKey;
+
+ #ifdef COMPILE_SSL_SUPPORT
unsigned char * secret=(unsigned char *) KviMemory::allocate(DH_size(g_fish_dh));
int secretLen;
BIGNUM *bn = BN_bin2bn((unsigned char *) szHisPubKey.data(), szHisPubKey.size(),NULL);
@@ -203,22 +206,21 @@
/// SHA256 hash = 32 byte
unsigned char * hashedSecret=(unsigned char *) KviMemory::allocate(32);
- #ifdef COMPILE_SSL_SUPPORT
- SHA256(secret, secretLen, hashedSecret);
- #else
- c->warning(__tr2qs("FiSH has been compiled without ssl support, unable to proceed"));
- return false;
- #endif
+ SHA256(secret, secretLen, hashedSecret);
KviMemory::free(secret);
- KviCString szFinalKey;
szFinalKey.bufferToBase64((char *) hashedSecret, 32);
//strip the trailing =
szFinalKey.stripRight('=');
KviMemory::free(hashedSecret);
+ #else
+ c->warning(__tr2qs("FiSH has been compiled without ssl support, unable to proceed"));
+ return false;
+ #endif
+
(void)g_pModuleManager->loadModulesByCaps("crypt");
QString szEngine="Mircryption";