qt5base-lts/tests/auto/network/ssl/qssldiffiehellmanparameters
Mikkel Krautz 19a1a0871d QSslDiffieHellmanParameters: simplify defaultParameters() construction
This commit simplifies defaultParameters() to simply construct an empty
QSslDiffieHellmanParameters and assigning the DER-form of the DH parameters
to QSslDiffieHellmanParametersPrivate's derData field.

This creates a valid QSslDiffieHellmanParameters instance, but skips any
potentially expensive verification steps.

The previous implementation of defaultParameters() would use the public
fromEncoded() method to construct an instance of the default parameters.
This triggers a verification of the passed-in data, which can be expensive.

To ensure our defaultParameters() QSslDiffieHellmanParameters instance does
pass verification, this commit adds an autotest to verify that.

Fixes QTBUG-57815.

Change-Id: I6b1d9dbbfde526b232c319195ddbad42326be27c
Task-number: QTBUG-57815
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-01-18 11:32:02 +00:00
..
qssldiffiehellmanparameters.pro Add settable QSslDiffieHellmanParameters for QSslSocket-based servers. 2016-05-25 20:00:12 +00:00
tst_qssldiffiehellmanparameters.cpp QSslDiffieHellmanParameters: simplify defaultParameters() construction 2017-01-18 11:32:02 +00:00