dbhub: Add basic HTTPS support

This adds basic support for fetching databases via HTTPS using client
certificates. You can include CA certificates to verify any responses
from a server. For now, one test CA certificate is included but it's
easy to add more.

It's also possible to authentify the client using a client certificate,
a client key and a password. As of this commit all three items are
hardcoded.

It's still possible to access any remote database via HTTP but if a
request URL starts with 'https' this new mechanism will be used.

All certificates, keys, and password included in here are taken from my
node.js test server repository. They will be replaced soon-ish.
This commit is contained in:
Martin Kleusberg
2016-10-25 20:42:31 +02:00
parent fad7246400
commit c2a9608c80
9 changed files with 195 additions and 5 deletions

View File

@@ -1692,6 +1692,9 @@ void MainWindow::reloadSettings()
// Hide or show the File → Remote menu as needed
QAction *remoteMenuAction = ui->menuRemote->menuAction();
remoteMenuAction->setVisible(Settings::getSettingsValue("MainWindow", "remotemenu").toBool());
// Update the remote database connection settings
m_remoteDb.reloadSettings();
}
void MainWindow::httpresponse(QNetworkReply *reply)