summaryrefslogtreecommitdiffstats
path: root/src/core/ssl_host_state_delegate_qt.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-01-30 17:23:41 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-03-15 16:52:17 +0000
commitd5bffb5125da23718e8098441b4a4269a5cf2f33 (patch)
tree48a39ba7f833116cba7dcc7917d13d34a062949c /src/core/ssl_host_state_delegate_qt.cpp
parent789f375411b542db3ac3be79cbe0a6153720abf1 (diff)
Basic adaptations for 64-based
Change-Id: I11e2da206e4e59872a38c178f57a5879c1bbf229 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'src/core/ssl_host_state_delegate_qt.cpp')
-rw-r--r--src/core/ssl_host_state_delegate_qt.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/core/ssl_host_state_delegate_qt.cpp b/src/core/ssl_host_state_delegate_qt.cpp
index d7e86cfbc..9fa62cacb 100644
--- a/src/core/ssl_host_state_delegate_qt.cpp
+++ b/src/core/ssl_host_state_delegate_qt.cpp
@@ -47,13 +47,6 @@ namespace QtWebEngineCore {
// Mirrors implementation in aw_ssl_host_state_delegate.cc
-static net::SHA256HashValue getChainFingerprint256(const net::X509Certificate &cert)
-{
- net::SHA256HashValue fingerprint =
- net::X509Certificate::CalculateChainFingerprint256(cert.os_cert_handle(), cert.GetIntermediateCertificates());
- return fingerprint;
-}
-
CertPolicy::CertPolicy()
{
}
@@ -64,7 +57,7 @@ CertPolicy::~CertPolicy()
bool CertPolicy::Check(const net::X509Certificate& cert, net::CertStatus error) const
{
- net::SHA256HashValue fingerprint = getChainFingerprint256(cert);
+ net::SHA256HashValue fingerprint = cert.CalculateChainFingerprint256();
auto allowed_iter = m_allowed.find(fingerprint);
if ((allowed_iter != m_allowed.end()) && (allowed_iter->second & error) && ((allowed_iter->second & error) == error))
return true;
@@ -73,7 +66,7 @@ bool CertPolicy::Check(const net::X509Certificate& cert, net::CertStatus error)
void CertPolicy::Allow(const net::X509Certificate& cert, net::CertStatus error)
{
- net::SHA256HashValue fingerprint = getChainFingerprint256(cert);
+ net::SHA256HashValue fingerprint = cert.CalculateChainFingerprint256();
m_allowed[fingerprint] |= error;
}