Commit 9a0496eb authored by Eike Hein's avatar Eike Hein
Browse files

Make the previously no-op private key setters mostly work.

CCBUG:164794
parent 57c3f0c7
......@@ -753,21 +753,32 @@ void KTcpSocket::setVerificationPeerName(const QString& hostName)
}
//TODO
void KTcpSocket::setPrivateKey(const KSslKey &key)
{
Q_UNUSED(key)
// We cannot map KSslKey::Algorithm:Dh to anything in QSsl::KeyAlgorithm.
if (key.algorithm() == KSslKey::Dh)
return;
QSslKey _key(key.toDer(),
(key.algorithm() == KSslKey::Rsa) ? QSsl::Rsa : QSsl::Dsa,
QSsl::Der,
(key.secrecy() == KSslKey::PrivateKey) ? QSsl::PrivateKey : QSsl::PublicKey);
d->sock.setPrivateKey(_key);
}
//TODO
void KTcpSocket::setPrivateKey(const QString &fileName, KSslKey::Algorithm algorithm,
QSsl::EncodingFormat format, const QByteArray &passPhrase)
{
Q_UNUSED(fileName)
Q_UNUSED(algorithm)
Q_UNUSED(format)
Q_UNUSED(passPhrase)
// We cannot map KSslKey::Algorithm:Dh to anything in QSsl::KeyAlgorithm.
if (algorithm == KSslKey::Dh)
return;
d->sock.setPrivateKey(fileName,
(algorithm == KSslKey::Rsa) ? QSsl::Rsa : QSsl::Dsa,
format,
passPhrase);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment