aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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";