diff options
Diffstat (limited to 'src/network/ssl/qsslkey_p.h')
-rw-r--r-- | src/network/ssl/qsslkey_p.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/network/ssl/qsslkey_p.h b/src/network/ssl/qsslkey_p.h index c93941c198..7ae2cc740b 100644 --- a/src/network/ssl/qsslkey_p.h +++ b/src/network/ssl/qsslkey_p.h @@ -81,9 +81,8 @@ public: #ifndef QT_NO_OPENSSL bool fromEVP_PKEY(EVP_PKEY *pkey); #endif - void decodeDer(const QByteArray &der, bool deepClear = true); - void decodePem(const QByteArray &pem, const QByteArray &passPhrase, - bool deepClear = true); + void decodeDer(const QByteArray &der, const QByteArray &passPhrase = {}, bool deepClear = true); + void decodePem(const QByteArray &pem, const QByteArray &passPhrase, bool deepClear = true); QByteArray pemHeader() const; QByteArray pemFooter() const; QByteArray pemFromDer(const QByteArray &der, const QMap<QByteArray, QByteArray> &headers) const; @@ -93,6 +92,12 @@ public: QByteArray toPem(const QByteArray &passPhrase) const; Qt::HANDLE handle() const; + bool isEncryptedPkcs8(const QByteArray &der) const; +#if !QT_CONFIG(openssl) + QByteArray decryptPkcs8(const QByteArray &encrypted, const QByteArray &passPhrase); + bool isPkcs8 = false; +#endif + bool isNull; QSsl::KeyType type; QSsl::KeyAlgorithm algorithm; |