aboutsummaryrefslogtreecommitdiff
path: root/src/ssltrust.cpp
diff options
context:
space:
mode:
authorFelix (xq) Queißner <git@mq32.de>2020-06-19 21:13:32 +0200
committerFelix (xq) Queißner <git@mq32.de>2020-06-19 21:13:32 +0200
commitbfdc7d39485bbef90a65b79f6c3b0986133f530d (patch)
tree7a50b6c9dc372cb302f064940c25826d0e1e07a1 /src/ssltrust.cpp
parent63103aa8c7f5b56720da097c73aa99da25841d45 (diff)
downloadkristall-bfdc7d39485bbef90a65b79f6c3b0986133f530d.tar.gz
Reworks TLS trust to enable symmetry between HTTPS and Gemini
Diffstat (limited to 'src/ssltrust.cpp')
-rw-r--r--src/ssltrust.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ssltrust.cpp b/src/ssltrust.cpp
index 92d913c..c5b7895 100644
--- a/src/ssltrust.cpp
+++ b/src/ssltrust.cpp
@@ -74,3 +74,14 @@ bool SslTrust::isTrusted(QUrl const & url, const QSslCertificate &certificate)
return false;
}
}
+
+bool SslTrust::isTrustRelated(QSslError::SslError err)
+{
+ switch(err)
+ {
+ case QSslError::CertificateUntrusted: return true;
+ case QSslError::SelfSignedCertificate: return true;
+ case QSslError::UnableToGetLocalIssuerCertificate: return true;
+ default: return false;
+ }
+}