Add support for Elliptic Curve keys for CertFP
authorMichael Marley <michael@michaelmarley.com>
Sat, 31 Mar 2018 18:06:16 +0000 (14:06 -0400)
committerManuel Nickschas <sputnick@quassel-irc.org>
Mon, 7 May 2018 19:03:56 +0000 (21:03 +0200)
commit0dbec2cfc937857d66a9645249f876f1e6b3f05e
treeed7ae62866d2ce1f19886781a7221c5e75be594e
parent92f4dca367c3a6f0536a1e0f3fbb44bb6ed4da62
Add support for Elliptic Curve keys for CertFP

This functionality is controlled by a feature flag so that clients
supporting EC keys won't try to set an EC key on a core that
doesn't.  As with the previous EC patch, this requires Qt 5.5 to
work but uses the QT_VERSION macro to remain compileable with Qt4.

This patch also fixes the QSsl::KeyAlgorithm indices to be correct
for both Qt4 and Qt5.  In Qt4, RSA was 0 and DSA was 1, but in Qt5
0 became Opaque, 1 because RSA, and two became DSA.  EC is 3 and
wasn't added until 5.5.  The new macro handles all three versions
correctly.  (See https://doc.qt.io/qt-5/qssl.html#KeyAlgorithm-enum
and https://doc.qt.io/archives/qt-4.8/qssl.html#KeyAlgorithm-enum.)
Thanks to @justJanne for pointing out this discrepancy.

Closes GH-347.
src/client/clientidentity.cpp
src/common/quassel.h
src/core/coreidentity.cpp
src/qtui/settingspages/identityeditwidget.cpp