Commit Graph

2 Commits

Author SHA1 Message Date
Mikkel Krautz
7d83448d09 FFDHE: add NamedGroups method for getting a list of supported named groups.
Also updates TestFFDHE to exercise the new method (and, in doing so,
refactors the tests a bit).

The core check logic from exercise() is moved into a tryFFDHELookupByName
function, which is now used by both the exercise() test, as well as the
namedGroupsMethod() test that is added by this commit.
2017-08-06 22:13:01 +02:00
Mikkel Krautz
d993b83b83 FFDHE: new class for accessing RFC 7919 FFDHE parameters.
This commit adds a new class that gives access to the
Diffie-Hellman parameters from RFC 7919.

The class exposes a static function, PEMForNamedGroup, which
looks up a set of Diffie-Hellman parameters in PEM form by
the name used in RFC 7919.

For example, to get the PEM form of 'ffdhe2048', you would
call

	QByteArray pem = FFDHE::PEMForNamedGroup(QLatin1String("ffdhe2048"));

With that in hand, you can pass the returned PEM data to
QSslDiffieHellmanParameters to construct an object that can be set
on a QSslSocket-based TLS server.
2017-07-28 00:16:36 +02:00