Due to the custom certificate mangement inside QGIS, network requests cannot use on-demand root cert loading. This causes issues (at least) on fresh Windows installs, where there is initially only a few certs installed and everything else is installed on demand, if the site uses a known-trusted but non-installed root cert.
It seems network requests always set the certs on the QSslConfiguration by using the QGIS store (which returns also the system certs) and merging those with the ones in Qt QNetworkRequest defaultSslConfiguration (only system certs?). This will set the on-demand loading to false.
Could there be a way to first take a difference of the QGIS cert store and the default certs, and only if there is something different then add the remaining certs? This could allow work as intented, i.e. no customized bundle -> by default allow on-demand loading.
Steps to reproduce the issue
Be on a fresh Windows installation (or manually remove IRSG Root X1 from store)
Install QGIS from a pre-downloaded installer without accessing anything in browser
Open QGIS, observe that access to version.qgis.org fails
It has a Let's Encrypt cert, and its ISRG Root is not a installed on a fresh Windows install
Open a browser and access version.qgis.org
Reopen QGIS, observe that access version.qgis.org succeeds
Browser did the on-demand install
Versions
QGIS 3.22.15 on Windows 10
Supported QGIS version
[X] I'm running a supported QGIS version according to the roadmap.
If the system CA certs are not in use (a CA bundle has been set
on the socket or as the global configuration), then this is skipped.
This is so an application can continue to use its own cert bundle
rather than trusting the system certs.
What is the bug or the crash?
Due to the custom certificate mangement inside QGIS, network requests cannot use on-demand root cert loading. This causes issues (at least) on fresh Windows installs, where there is initially only a few certs installed and everything else is installed on demand, if the site uses a known-trusted but non-installed root cert.
It seems network requests always set the certs on the QSslConfiguration by using the QGIS store (which returns also the system certs) and merging those with the ones in Qt QNetworkRequest defaultSslConfiguration (only system certs?). This will set the on-demand loading to false.
Could there be a way to first take a difference of the QGIS cert store and the default certs, and only if there is something different then add the remaining certs? This could allow work as intented, i.e. no customized bundle -> by default allow on-demand loading.
Steps to reproduce the issue
version.qgis.org
failsversion.qgis.org
version.qgis.org
succeedsVersions
QGIS 3.22.15 on Windows 10
Supported QGIS version
New profile
Additional context
Qt seems to have implemented on-demand loading before version 5, and the explanation for the behaviour is described like this: