aboutsummaryrefslogtreecommitdiff
path: root/src/browsertab.cpp
diff options
context:
space:
mode:
authorFelix (xq) Queißner <git@mq32.de>2020-06-18 19:10:39 +0200
committerFelix (xq) Queißner <git@mq32.de>2020-06-18 19:10:39 +0200
commitfe7effa97f20a8c09c65617d8346b1c75d1f7a8e (patch)
treeee63f96e8e92c5c153d64e447d40c24161424d29 /src/browsertab.cpp
parent34fe83beefddb46ef22adaf5f0bcd56195d48f17 (diff)
downloadkristall-fe7effa97f20a8c09c65617d8346b1c75d1f7a8e.tar.gz
Makes client certificate usage a bit more secure.
Diffstat (limited to 'src/browsertab.cpp')
-rw-r--r--src/browsertab.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/browsertab.cpp b/src/browsertab.cpp
index 359fd7c..456af37 100644
--- a/src/browsertab.cpp
+++ b/src/browsertab.cpp
@@ -663,9 +663,25 @@ bool BrowserTab::startRequest(const QUrl &url)
if(answer != QMessageBox::Yes)
return false;
this->current_handler->disableClientCertificate();
+ this->ui->enable_client_cert_button->setChecked(false);
}
} else {
this->current_handler->disableClientCertificate();
+ this->ui->enable_client_cert_button->setChecked(false);
+ }
+
+ if(this->current_identitiy.isValid() and (url.host() != this->current_location.host())) {
+ auto answer = QMessageBox::question(
+ this,
+ "Kristall",
+ "You want to visit a new host, but have a client certificate enabled. This may be a risk to expose your identity to another host.\r\nDo you want to keep the certificate enabled?",
+ QMessageBox::Yes | QMessageBox::No,
+ QMessageBox::No
+ );
+ if(answer != QMessageBox::Yes) {
+ this->current_handler->disableClientCertificate();
+ this->ui->enable_client_cert_button->setChecked(false);
+ }
}
this->current_location = url;