diff options
author | Sebastian Lösch <sebastian.loesch@governikus.com> | 2015-08-11 10:27:16 +0200 |
---|---|---|
committer | André Klitzing <aklitzing@gmail.com> | 2016-01-04 18:10:14 +0000 |
commit | 73ad2bf32f83a19630ae12845627a33bbb76985d (patch) | |
tree | e9305018a6540a02a592982d769b1280b04a7c81 /src/network/ssl/qsslconfiguration.cpp | |
parent | a9e1fc29cae050d6a2987388af4da13ba3379623 (diff) |
Make ephemeral server key available
When using cipher algorithms with forward secrecy an ephemeral key is
used to generate the symmetric session key. Beside the SSL certificate's
key, this ephemeral key is of cryptographic interest.
The ephemeral key is chosen by the server side - currently statically in
the Qt implementation - so it is only of interest on the client side to
check it. Therefore the ephemeral key is the null key if the connection
is set up in server mode or a cipher without forward secrecy is used.
Change-Id: If241247dbb8490a91233ae47f2b38952c6591bf4
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
Diffstat (limited to 'src/network/ssl/qsslconfiguration.cpp')
-rw-r--r-- | src/network/ssl/qsslconfiguration.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/network/ssl/qsslconfiguration.cpp b/src/network/ssl/qsslconfiguration.cpp index 4803e47224..1f9055b50c 100644 --- a/src/network/ssl/qsslconfiguration.cpp +++ b/src/network/ssl/qsslconfiguration.cpp @@ -731,6 +731,23 @@ int QSslConfiguration::sessionTicketLifeTimeHint() const } /*! + \since 5.7 + + Returns the ephemeral server key used for cipher algorithms + with forward secrecy, e.g. DHE-RSA-AES128-SHA. + + The ephemeral key is only available when running in client mode, i.e. + QSslSocket::SslClientMode. When running in server mode or using a + cipher algorithm without forward secrecy a null key is returned. + The ephemeral server key will be set before emitting the encrypted() + signal. + */ +QSslKey QSslConfiguration::ephemeralServerKey() const +{ + return d->ephemeralServerKey; +} + +/*! \since 5.5 Returns this connection's current list of elliptic curves. This |