summaryrefslogtreecommitdiffstats
path: root/src/network/ssl/qsslkey_p.h
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2019-03-04 16:11:20 +0100
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2019-03-08 05:36:14 +0000
commit01a54342521de9994ef54f4a01916b8782c685f6 (patch)
tree0e461db5863612954c47385f0fb1f61c87b36cb3 /src/network/ssl/qsslkey_p.h
parentf91aae6397378f7f86a3dd320f4e2caa3843a5de (diff)
QSslKey - add a support for AES encrypted keys
for SecureTransport backend. OpenSSL, while reading RSA/DSA, is internally calling EVP_BytesToKey that essentially does the same thing this patch does in 'deriveAesKey' and thus able to correctly decrypt whatever it first encrypted (while generating/ encrypting keys). Fixes: QTBUG-54422 Change-Id: Ia9f7599c5b19bf364c179f2abd2aab7ea5359a65 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/network/ssl/qsslkey_p.h')
-rw-r--r--src/network/ssl/qsslkey_p.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/network/ssl/qsslkey_p.h b/src/network/ssl/qsslkey_p.h
index 06403b5479..1f2b59904a 100644
--- a/src/network/ssl/qsslkey_p.h
+++ b/src/network/ssl/qsslkey_p.h
@@ -105,7 +105,10 @@ public:
enum Cipher {
DesCbc,
DesEde3Cbc,
- Rc2Cbc
+ Rc2Cbc,
+ Aes128Cbc,
+ Aes192Cbc,
+ Aes256Cbc
};
Q_AUTOTEST_EXPORT static QByteArray decrypt(Cipher cipher, const QByteArray &data, const QByteArray &key, const QByteArray &iv);