summaryrefslogtreecommitdiffstats
path: root/src/network
Commit message (Collapse)AuthorAgeFilesLines
* Redo QNetworkAccessBackend and various cleanups around itMårten Nordheim2020-08-2717-464/+796
| | | | | | | | | | | | | | | | | | | | | | Makes the QNetworkAccessBackendFactory a real interface to be used in plugins. Requires exporting some classes but they're not made public yet. Removes unused features and functions. Some things are likely still unused due to being specific for HTTP but the HTTP network replies don't use this backend system. Changes QNetworkAccessBackend to use a more traditional read(char*, qint64) function for the "downloaded" data. And an optional readPointer if supported. So far no backends have it so it's somewhat useless, but it may be useful going forward. If not it shall be deleted Converts all current backends to the new setup Easy enough, also gets rid of some unused functions. Task-number: QTBUG-80340 Change-Id: I9339e6c6eb394c471c921f5cafd3af6175936399 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove QFtp sources etc. in favor of alternate distributionMårten Nordheim2020-08-2717-4221/+2
| | | | | | | | | | | | While we initially wanted to just disable the functionality the way it is currently built forces people to do a full build of Qt just to enable it. Instead of doing this half-measure let's just remove the code completely from QtBase and rather prepare QtNetwork to handle being a plugin that can be compiled at any time. Task-number: QTBUG-80340 Change-Id: I19155c8c167cf932088f01b2a9706d0e7ab792d1 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QAbstractSocket: Resolve remaining Qt6 TODOsMårten Nordheim2020-08-243-54/+5
| | | | | Change-Id: Id257f0721c1cd5fcbafa9297bae0251a2d68e366 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Make QNetworkAccessManager::supportedSchemes virtualMårten Nordheim2020-08-242-9/+7
| | | | | Change-Id: I6807e2133049551bbaa4c6f312b6a00ea752f81b Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QHostInfo: address a Qt 6 todoMårten Nordheim2020-08-242-18/+16
| | | | | | | | Merged the two functions, required adding a friend declaration Change-Id: I86265da19e4b5f53d9e2dc54de3e252f0364225b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Disable cipherstring-setting test for schannelMårten Nordheim2020-08-241-0/+2
| | | | | | | And put a note about it in the documentation Change-Id: I29126e4a80f83c256190e03b8fe01f3c869fd46d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* http: When falling back to http/1 use the socket's ssl configMårten Nordheim2020-08-241-10/+4
| | | | | | | | | And not the ssl configuration we have on the reply since it's missing e.g. the newly received session ticket. Change-Id: Idfeb09012a847605a76d1fe4fb881c663d019b4a Reviewed-by: Peter Hartmann <peter@edelhirsch.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QNetworkReply(http): Ignore ssl errors in all reserved channelsMårten Nordheim2020-08-241-2/+6
| | | | | | | | | | | and not just the active one(s). When starting the connection with HTTP/2 and calling QNetworkReply::ignoreSslErrors() it would previously only ignore the errors in the single active channel that was used, but if we then fall back to HTTP/1.1 then we'll use the 5 other channels as well, and those would then fail due to the ignored ssl errors. Change-Id: I7aeb5b59897dd3a53579f0d38bd255bc2d97c2bb Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Use QMetaType in QMetaCallEventLars Knoll2020-08-241-3/+3
| | | | | | | And don't use int based type mapping anymore. Change-Id: I456e76d1933ef646a7bd39ce565886b89e938a44 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Deprecate the static int based API in QMetaTypeLars Knoll2020-08-241-3/+5
| | | | | | | | | | | | | And remove one of the type id to name mapping that still existed in QMetaType. QMetaTypeInterface can provide that, so there's no need to have a second copy of the data. qMetaTypeTypeInternal() can still map all the names of all builtin types to ids. That functionality is for now still required by moc and can't be removed yet. Change-Id: Ib4f8e9c71e1e7d99d52da9e44477c9a1f1805e57 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QIODevice: implement a "zero-copy" strategy for buffered writesAlex Trotsenko2020-08-203-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | It works as follows: - user calls write(const QByteArray &); - this function keeps a pointer to the chunk and calls a regular write(data, len); - write(data, len) calls a virtual writeData(); - subclass calls a new QIODevicePrivate::write(); - QIODevicePrivate::write() makes a shallow copy of the byte array. Proposed solution is fully compatible with existing subclasses. By replacing a call to d->writeBuffer.append() with d->write(), subclasses can improve their performance. Bump the TypeInformationVersion field in qtHookData, to notify the Qt Creator developers that the offset of QFilePrivate::fileName was changed and dumpers should be adapted. Change-Id: I24713386cc74a9f37e5223c617e4b1ba97f968dc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix a number of qdoc warningsFriedemann Kleint2020-08-201-4/+4
| | | | | | | | | | | - Remove obsolete functions and enumeration values - Remove QObject * parameter from QMetaProperty accessors - Fix renamed enumerations in QSsl - Fix list items to be \li - Fix function signatures and variable names Change-Id: I37c7e6bf2c8ff92bc7b82620bae0a27796f866ab Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Remove QSslSocket::abort()Alex Trotsenko2020-08-203-39/+11
| | | | | | | | | | | | | | | | QAbstractSocket::abort() is not a virtual function and QSslSocket::abort() does not override it. Having two alternatives requires a dynamic typecasting and violates the principles of object- oriented programming. Due to the BC, we were unable to fix that in Qt5. Now, we can modify QSslSocket::close() to handle QAbstractSocket::abort() requests and remove the duplicate. Change-Id: I49d6f32a571ae6e35b08cb366816f917e580dae8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QSslContext - do a little cleanup (OpenSSL)Timur Pocheptsov2020-08-193-11/+11
| | | | | | | | | | | | | | | 1. Remove a useless forward declaration of a non-existing class. 2. Simplify the cipher filtering. 3. A missing private key (when local cert is present) found by the Qt, not OpenSSL, so no need in asking OpenSSL for errors in queue. 3. Fix a potential double-free (for opaque keys). 4. read/write BIOs normally owned by SSL object, but if we fail to allocate any of them, we return early, potentially failing to free the one that was allocated. Change-Id: Ifb52fbc9fd1a38f101bd7ff02e79b82d6eb7e5b0 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Make QAbstractSocket::abort() behavior unambiguousAlex Trotsenko2020-08-191-2/+0
| | | | | | | | | | | | | | | | After calling this function, the user expects that the connection is terminated, I/O device is closed and the socket is ready for a new attempt. But, if the socket was disconnected before the call, close() is not called and I/O device remains opened. Because QAbstractSocket::close() and QIODevice::close() can handle reentering, we can call close() unconditionally, which makes the behavior obvious. Change-Id: I90a9cbb1a1fe8f866b55ef0bd68d286b34e853f5 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CMake Build: Add socket as a dependency for QtNetwork on QNXCristian Adam2020-08-191-0/+2
| | | | | | | | | QtNetwork requires the socket library as a public dependency. Similar to Windows's ws2_32 library. Task-number: QTBUG-83202 Change-Id: I92bb48fddc2cbea07700cde65b4737500b9820f7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QSsl: introduce qtls_utils_p.h with simple RAII helpersTimur Pocheptsov2020-08-183-4/+102
| | | | | | | | | Now that I need this stuff both in OpenSSL and woldSSL code, makes sense to introduce such helpers as a separate change (instead of duplicating the code in wolfSSL patch). Change-Id: I9ce600ebe709d103209372ea4c2bdb6fa6b6ce3a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* CMake: Re-generate src/network/configure.cmakeJoerg Bornemann2020-08-181-1/+1
| | | | | Change-Id: I408ac23156505901194e9aa6f151bac889e432ff Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QDecompressHelper: Fix warnings in zstd codeMårten Nordheim2020-08-171-4/+1
| | | | | | | | | | | | | One warning about unused variable (dataLeftover), which was at some point replaced by the class variable 'decoderHasData'. The second warning was a fault of logic: checking that the unsigned value retValue was greater than or equal to zero. Which only came about because they initially did different things but the branches got merged and the logic became flawed. Change-Id: Ia3a04516c1b7b5f962226998bf3f4d101dd38148 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Re-implement configure/qmake's command line handling in CMakeJoerg Bornemann2020-08-171-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | We extend configurejson2cmake to read the "commandline" information from configure.json. This data is then translated to CMake function calls and written it into commandline.cmake files. We extend QtProcessConfigureArgs.cmake to pick up those commandline.cmake files to feed our command line handling code, which is a re-implementation of the command line handling in qt_configure.prf. The command line handler sets INPUT_xxx variables, similar to configure/qmake's config.input.xxx variables. The INPUT_xxx values are translated - to -DFEATURE_xxx=ON/OFF arguments if the input represents a feature, - to corresponding CMake variables if such a variable is known, - or to -DINPUT_xxx=yyy CMake arguments. Configure arguments that have an entry in cmake/configure-cmake-mapping.md are actually implemented. Other arguments are likely to need more work. Task-number: QTBUG-85373 Change-Id: Ia96baa673fc1fb88e73ba05a1afb473aa074b37d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Disentangle QIODevice dependenciesLars Knoll2020-08-151-1/+1
| | | | | | | | | | | | | | | | | Move the QIODevice::OpenMode enum into a base class, so that we can remove the full QIODevice (and thus QObject) dependency from qdatastream.h and qtextstream.h. This is required so that we can include QDataStream in qmetatype.h without getting circular dependencies. As a nice side effect, QDataStream and QTextStream can now inherit QIODeviceBase and provide the OpenMode enum directly in their class scope. Change-Id: Ifa68b7b1d8d95687ed032f6c9206f92e63bfacdf Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Replace Qt CONSTEXPR defines with constexprAllan Sandfeld Jensen2020-08-143-10/+10
| | | | | | | | Both normal and relaxed constexpr are required by our new minimum of C++17. Change-Id: Ic028b88a2e7a6cb7d5925f3133b9d54859a81744 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* QDecompressHelper: Introduce zstd supportMårten Nordheim2020-08-145-2/+96
| | | | | | | | | Also take this opportunity to reshuffle the content-encodings in the intended ordering since the ordering is used to signify priority. Task-number: QTBUG-83269 Change-Id: I022eecf1ba03b54dbd9c98a9d63d05fb05fd2124 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Set default redirect policy to NoLessSafeRedirectPolicyFrederik Gladhorn2020-08-136-39/+22
| | | | | | | | | | | | | | | | | | | | | Not following redirects is not a feature, but just a hastle for everyone. The main issue with switching this default is that applications that actually do manual redirect handling will break in various ways. FollowRedirectsAttribute was removed as it no longer serves any purpose beyond duplicating the default value. [ChangeLog][Network] QNetworkAccessManager now follows redirects by default with the NoLessSafeRedirectPolicy. [ChangeLog][Potentially Source-Incompatible Changes] QNetworkRequest::FollowRedirectsAttribute was removed and has been superseded by QNetworkRequest::RedirectsPolicyAttribute Fixes: QTBUG-85901 Change-Id: Ic5b776180a4b84ac4fc895158bb5a66a3c91a042 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QNAM: Don't error out if the server doesn't support any ALPN we requestMårten Nordheim2020-08-131-2/+2
| | | | | | | | | | If we ask for HTTP/2 or 1.1 and the server doesn't list either then we should still try to connect using HTTP/1(.1) just in case, to keep compatibility. Task-number: QTBUG-85902 Change-Id: I6ff2e38ac9d767e482a19ee4c81d101be37d3fab Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QNAM: Don't close the connection due to not having a layer preferenceMårten Nordheim2020-08-131-2/+5
| | | | | | | | This seems to only be happening when we have a single channel because otherwise it will try IPv4 in one channel and IPv6 in the second. Change-Id: I0d513e25fefffeabfc733e895827aa12da335ef9 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QNAM: HTTP/2: Set user-agent for the HTTP proxy's headerMårten Nordheim2020-08-131-4/+13
| | | | | | | | The user-agent should be propagated to the proxy as well or else we get our default one. Change-Id: Id2283a8f2ade1a32f7fcf3d691be8d380d334b50 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QNAM: Fix proxy auth handling when requesting but not yet changed to h2Mårten Nordheim2020-08-132-2/+4
| | | | | | | | In some cases (i.e. with SOCKS) we don't have a HTTP/2 request ready yet so it would just error out. Change-Id: I6449de5fb52f5208d5641062c5906c3baff18b77 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* HTTP/2: Don't handle Remote Disconnected if we haven't switched yetMårten Nordheim2020-08-121-1/+2
| | | | | | | | | In that case we haven't created the h2 handler yet, so it will crash when trying to access various members. Task-number: QTBUG-85902 Change-Id: Id0699ff06ef67748a16622703f731db0b0867771 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QDecompressHelper: Change order of encodingsUlf Hermann2020-08-121-1/+1
| | | | | | | | | Before the introduction of QDecompressHelper gzip was preferred over deflate. The change seems to be accidental. Amends commit 7b76379a89158f10780cbfc74965027246faec68. Change-Id: I70f33d551912465d63f49ea3db1ac3575d19a92d Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Introduce QIODevice::skipData()Alex Trotsenko2020-08-1112-26/+38
| | | | | | | | | | | | | | | | | | | QIODevice::skip() called a virtual QIODevicePrivate::skip() to implement an efficient skipping on I/O devices for the internal subclasses. The user subclasses cannot inherit QIODevicePrivate, so this functionality was not externally accessible. This patch replaces QIODevicePrivate::skip() with a virtual protected QIODevice::skipData(). While the basic implementation simply discards the data by reading into a dummy buffer, users can reimplement this function to improve the performance in their subclasses. [ChangeLog][QtCore][QIODevice] Added virtual protected skipData(). Now, subclasses can implement device-specific skipping of data. Change-Id: I9522f7f7ab9d03ac06e972a525f8ec2fa909a617 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QDecompressHelper: Add brotli supportMårten Nordheim2020-08-067-1/+168
| | | | | | Task-number: QTBUG-83269 Change-Id: If23b098ee76a4892e4c2c6ce5c635688d8d9138d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Mark QSslError(SslError error) as explicitLars Schmertmann2020-08-062-6/+6
| | | | | | | | | | | | | | | Currently it is possible to compare a QSslError with a QSslError::SslError because QSslError has an implicit constructor. But the comparison often fails because a QSslError received from the system contains a certificate. [ChangeLog][QtNetwork][QSslError] The constructor QSslError(QSslError::SslError error) is now explicit. Change-Id: I36cc5895245d3b43ab4b8d65a9635893d6b0e6a4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Make use of QDecompressHelper for HTTP downloadsMårten Nordheim2020-08-056-139/+63
| | | | | | | | | | Changes are not too big for now. Just replaces use of the previous calls to the zlib decompression function. And initialize QDecompressHelper when we know the content-encoding. Task-number: QTBUG-83269 Change-Id: I41358feaef2e7ac5f48f14e3f95ec094e0c110b7 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QAuth.: Reset the nonce-count when the server requests using a new nonceMårten Nordheim2020-08-051-1/+3
| | | | | | | | | | | | Some servers have an upper limit on how many times a nonce can be reused. Because the nc was not being reset the server would get a high nc and would close the connection. Change-Id: I71d5a316f79777a45c7323d93e28b3845aefcfad Original-patch-by: Benjamin Reikowski Pick-to: 5.15 Fixes: QTBUG-85729 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Privately introducing QDecompressHelper for network purposesMårten Nordheim2020-08-055-0/+601
| | | | | | | | | To support streaming decompression in QNAM. Will also be used to refactor existing decompression code in QNAM. Task-number: QTBUG-83269 Change-Id: Iecf3e359734163f15686c949f75d41fa4794a00e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QSslSocket: remove a redundant forward declarationTimur Pocheptsov2020-08-041-1/+0
| | | | | Change-Id: I9a3b6ccc022a036fa82d429ad008adeabe46f4ce Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QtNetwork: use Q_DISABLE_COPY_MOVETimur Pocheptsov2020-08-046-6/+6
| | | | | | | | | We have several classes inheriting QObject (directly or not) and disabling copy (thus non-movable implicitly). Let's make them non-movable explicitly now. Change-Id: I509a066e9977480b30842afef26319b8afec6001 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Android: Install the qmldir files when configuring for a single abiAndy Shaw2020-08-031-1/+1
| | | | | | | | | | | This amends 0ef46b41d86b9fad4fc4a18bd577d208afa1fce8 to ensure the new configuration is styled correctly for qmake. Task-number: QTBUG-80938 Change-Id: Iebfff3ff0570d2e92d01d4eb1178c0d6261468f9 Pick-to: 5.15 Reviewed-by: Lars Schmertmann <lars.schmertmann@governikus.de> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Another round of 0->nullptr cleanupAllan Sandfeld Jensen2020-07-313-11/+11
| | | | | Change-Id: Ic8db7dc252f8fea46eb5a4f334726d6c7f4645a6 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* CMake: Regenerate projectsAlexandru Croitor2020-07-312-2/+2
| | | | | Change-Id: Iac12acd07513e790e531ae93366fdae70c1c61a5 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* wasm: fix setTransferTimeoutLorn Potter2020-07-294-6/+8
| | | | | | | | | | WebAssembly does not need the http feature, but these functions were hidden behind that feature. Fixes: QTBUG-83867 Pick-to: 5.15 Change-Id: I7cd9aa73003f45ccbc2613c67c21e4067d6edddd Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: fix network headers logicLorn Potter2020-07-291-6/+8
| | | | | | | Fixes: QTBUG-85083 Pick-to: 5.15 Change-Id: Iaf0f3365ee20fe257f3edac0e1105bdfcc5ba0da Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QSslSocket (OpenSSL, Windows) - make sure we ignore stale fetch resultsTimur Pocheptsov2020-07-283-1/+28
| | | | | | | | | | | The CA fetcher on Windows works on a separate thread, it can take quite some time to finish its job and if a connection was meanwhile closed (via 'abort', 'close' or 'disconnectFromHost') but the socket is still alive/re-used - we don't want to be fooled by the previous fetch 'finished' signal, only if it's fetching for the same certificate. Change-Id: Ibd0a70000ad10cff10207d37d7b47c38e615d0f1 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QSslSocket (OpenSSL) - fix a minor type errorTimur Pocheptsov2020-07-282-2/+2
| | | | | | Change-Id: I76bf6c7d47c7d29228837bbb139a7f6a32de0e5e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QHostAddress: resolve API issues marked with ##Qt6Timur Pocheptsov2020-07-282-68/+2
| | | | | | | | Also, remove the deprecated function and its auto-test. Change-Id: If04a54c4b91e0f76523960c7b1a5bcb8fe883ac6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QNativeSocketEngine/Win: fix write() in case of splittingAlex Trotsenko2020-07-281-3/+1
| | | | | | | | | | | | When a first call to ::WSASend() consumes less data than requested, we are trying to make a second call, leaving 'bytesToSend' unmodified. Instead of setting a new value for 'bytesToSend', it seems reasonable to break the loop, if the system buffer overflow detected. Pick-to: 5.15 Change-Id: I8038e95c20221518955efe786f2d0dadb98360fa Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* SecureTransport: Set requested ciphers specified in the configurationAndy Shaw2020-07-242-0/+95
| | | | | | Fixes: QTBUG-83491 Change-Id: I783a355be5405d4c44e703874bdf2e14afe629e1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QSslSocket::flush - purge the function marked for removal in Qt6Timur Pocheptsov2020-07-232-20/+0
| | | | | | | | | QAbstractSocket::flush stopped being virtual and, instead, QAbstractSocketPrivate::flush is now virtual. So the code in QSslSocket is essentially a duplicate. Change-Id: Iebb33c8490268270b90a662ab64b1ae47c4cbac7 Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix OCSP-Stapling error if identity cannot be verifiedAndré Klitzing2020-07-171-0/+5
| | | | | | | | | | | | | | | If QSslConfiguration::setCaCertificates is set to empty list openssl cannot verify the OCSP-Response. Qt will provide it as QSslError::OcspResponseCannotBeTrusted that can be ignored. But the openssl error is still in the error queue and prevents a successful reply in QNetworkReply::finished. So let's clear the queue after OCSP checking to avoid side affects. Change-Id: I44a7f45a2eebd20ea86a235a0534f80986c40a26 Fixes: QTBUG-85638 Pick-to: 5.15 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>