summaryrefslogtreecommitdiffstats
path: root/src/network/ssl/qsslkey_p.h
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2014-08-30 16:39:29 +0200
committerJeremy Lainé <jeremy.laine@m4x.org>2014-08-30 17:36:23 +0200
commit5c3a499c9ffbf2d4872dd6a6916b3a3a9a7d9cdd (patch)
tree9ea3da5c7856f1ae48b192e3f4999a8e775bc7b3 /src/network/ssl/qsslkey_p.h
parent2fd0afc1f87edf28295caeaeb8a830d888a3e81b (diff)
ssl: disable (broken) i/o on DER encoded keys
QSslKey currently has methods which supposedly allow decoding and encoding private keys as DER protected by a passphrase. This is broken by design as explained in QTBUG-41038, as storing the encrypted DER data alone makes no sense: such a file lacks the necessary information about the encryption algorithm and initialization vector. This change: - explicitly stops using the passphrase when decoding DER in the constructor. The behavior is unchanged, it is not possible to read the encrypted DER alone. - refuses to honor the passphrase to DER encode a private key. The toDer method now outputs an empty QByteArray instead of garbage. Task-number: QTBUG-41038 Change-Id: I4281050cf1104f12d154db201a173633bfe22bd9 Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'src/network/ssl/qsslkey_p.h')
-rw-r--r--src/network/ssl/qsslkey_p.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/network/ssl/qsslkey_p.h b/src/network/ssl/qsslkey_p.h
index 64a157ba09..9c1476038a 100644
--- a/src/network/ssl/qsslkey_p.h
+++ b/src/network/ssl/qsslkey_p.h
@@ -86,8 +86,7 @@ public:
#ifndef QT_NO_OPENSSL
bool fromEVP_PKEY(EVP_PKEY *pkey);
#endif
- void decodeDer(const QByteArray &der, const QByteArray &passPhrase,
- bool deepClear = true);
+ void decodeDer(const QByteArray &der, bool deepClear = true);
void decodePem(const QByteArray &pem, const QByteArray &passPhrase,
bool deepClear = true);
QByteArray pemHeader() const;