projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
adapt translations to previous change
[quassel.git]
/
src
/
core
/
cipher.cpp
diff --git
a/src/core/cipher.cpp
b/src/core/cipher.cpp
index
9ea9c13
..
7cc75d0
100644
(file)
--- a/
src/core/cipher.cpp
+++ b/
src/core/cipher.cpp
@@
-170,6
+170,13
@@
QByteArray Cipher::initKeyExchange()
QByteArray Cipher::parseInitKeyX(QByteArray key)
{
QCA::Initializer init;
QByteArray Cipher::parseInitKeyX(QByteArray key)
{
QCA::Initializer init;
+ bool isCBC = false;
+
+ if (key.endsWith(" CBC"))
+ {
+ isCBC = true;
+ key.chop(4);
+ }
if (key.length() != 181)
return QByteArray();
if (key.length() != 181)
return QByteArray();
@@
-198,6
+205,9
@@
QByteArray Cipher::parseInitKeyX(QByteArray key)
//remove trailing = because mircryption and fish think it's a swell idea.
while (sharedKey.endsWith('=')) sharedKey.chop(1);
//remove trailing = because mircryption and fish think it's a swell idea.
while (sharedKey.endsWith('=')) sharedKey.chop(1);
+ if (isCBC)
+ sharedKey.prepend("cbc:");
+
bool success = setKey(sharedKey);
if (!success)
bool success = setKey(sharedKey);
if (!success)