dbhub: Add client certificate management

Add a list of all configured client certificates to the preferences
dialog and show some information on them.

Add two button to the preferences dialog to add and remove client
certificates.

Copy configured client certificates to some safe place where they aren't
deleted by accident.

Change the remote code to expect certificate and private key in one
file. The path to this file is still hardcoded, now to client.cert.pem.

Remove the example client certificate as it's not up-to-date anymore
anyway.

Still missing: Option to use a configured client certificate from the
preferences dialog to authenticate.
This commit is contained in:
Martin Kleusberg
2016-11-01 22:54:50 +01:00
parent 02019e391b
commit 60e4cb758e
7 changed files with 312 additions and 115 deletions

View File

@@ -21,6 +21,7 @@ public:
void reloadSettings();
const QList<QSslCertificate>& caCertificates() const;
const QMap<QString, QSslCertificate>& clientCertificates() const { return m_clientCertFiles; }
void fetchDatabase(const QString& url);
@@ -37,6 +38,7 @@ private:
QProgressDialog* m_progress;
QNetworkReply* m_currentReply;
QSslConfiguration m_sslConfiguration;
QMap<QString, QSslCertificate> m_clientCertFiles;
};
#endif