dbhub: Use certificate manager to get client cert for authentication

When trying to fetch a database don't load a hardcoded client
certificate but grab one from the certificate manager in the preferences
dialog.

Also add support for password protected private keys.

Note: Since this is all testing code on the front-end side, we just use
the first certificate in case multiple certificates are configured.
This commit is contained in:
Martin Kleusberg
2016-11-06 14:50:27 +01:00
parent 982e4c4d34
commit eeeec5f2fc
3 changed files with 36 additions and 14 deletions

View File

@@ -23,7 +23,7 @@ public:
const QList<QSslCertificate>& caCertificates() const;
const QMap<QString, QSslCertificate>& clientCertificates() const { return m_clientCertFiles; }
void fetchDatabase(const QString& url);
void fetchDatabase(const QString& url, const QString& clientCert);
signals:
void openFile(QString path);