diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-08-01 12:57:44 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-10-17 10:44:07 +0000 |
commit | 0b1025b8aea4aa0336671f7e908287d65490d120 (patch) | |
tree | 77c201fee93d3c184ce5b6b28d55fc01dc4a6d9e /src/webenginewidgets/api/qwebengineprofile.cpp | |
parent | 7b886ab2cdfc94cc70477f51bd28961de52e989c (diff) |
Make it possible to enable OCSP on Linux
The code follows Chromium and also set a CertNetFetcher on both Linux
and macOS, but it appears to be currently unused.
[ChangeLog][QWebEngineProfile] A profile can now be designated to
download OCSP records and thus enable OCSP verification on Linux.
Task-number: QTBUG-58059
Task-number: QTBUG-71164
Change-Id: I84fd34d4351cb7aa4417ce4058f97bad4b8d0cd4
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Diffstat (limited to 'src/webenginewidgets/api/qwebengineprofile.cpp')
-rw-r--r-- | src/webenginewidgets/api/qwebengineprofile.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/webenginewidgets/api/qwebengineprofile.cpp b/src/webenginewidgets/api/qwebengineprofile.cpp index 537cf41fd..4b673b0ac 100644 --- a/src/webenginewidgets/api/qwebengineprofile.cpp +++ b/src/webenginewidgets/api/qwebengineprofile.cpp @@ -759,6 +759,41 @@ void QWebEngineProfile::destroyedUrlSchemeHandler(QWebEngineUrlSchemeHandler *ob } /*! + \since 5.13 + + Sets this profile to be used for downloading and caching when needed during + certificate verification, for instance for OCSP, CRLs, and AIA. + + Only one QWebEngineProfile can do this at a time, and it is recommended + that the profile fullfilling this role has a disk HTTP cache to avoid + needlessly re-downloading. + + Currently only affects Linux/NSS installations where it enables OCSP. + + As long as one profile has this option enabled, all other profiles will be + able to use it for their certificate verification. + + \sa isUsedForGlobalCertificateVerification(), httpCacheType() +*/ +void QWebEngineProfile::setUseForGlobalCertificateVerification() +{ + Q_D(QWebEngineProfile); + d->profileAdapter()->setUseForGlobalCertificateVerification(); +} + +/*! + \since 5.13 + + Returns \c true if this profile is currently being used for global + certificate verification. +*/ +bool QWebEngineProfile::isUsedForGlobalCertificateVerification() const +{ + Q_D(const QWebEngineProfile); + return d->profileAdapter()->isUsedForGlobalCertificateVerification(); +} + +/*! \since 5.7 Removes the profile's cache entries. |