Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Unmaintained
KDE Libraries
Commits
9a0496eb
Commit
9a0496eb
authored
Apr 07, 2012
by
Eike Hein
Browse files
Make the previously no-op private key setters mostly work.
CCBUG:164794
parent
57c3f0c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
kdecore/network/ktcpsocket.cpp
View file @
9a0496eb
...
...
@@ -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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment