summaryrefslogtreecommitdiffstats
path: root/src/network
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.12.2' into 5.12Qt Forward Merge Bot2019-03-151-2/+2
|\ | | | | | | Change-Id: I5f9d8090a07056411fb65d7de60eb679d00e99a3
| * Add all library dependencies for static OpenSSL builds on WindowsJoerg Bornemann2019-02-251-2/+2
| | | | | | | | | | | | | | | | | | | | Static builds of OpenSSL can now be linked with -openssl-linked without passing additional library dependencies like user32 or advapi32. Fixes: QTBUG-73205 Change-Id: I66c13096b0a1466c1e6dfbd014123e18655270e6 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Don't retry a ssl connection if encryption was never finishedMårten Nordheim2019-03-061-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | As explained in the inline comment we don't actually have a protocol handler until we're done encrypting when we use SSL, but we would still retry the connection if an error occurred between "connected" and "encrypted". This would then lead us to fail an assert that checked if a protocol handler had been set Fixes: QTBUG-47822 Change-Id: If7f4ef4f70e72b764f492e7ced5a9349b3a421d2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | wasm: fix corrupt downloadsLorn Potter2019-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | This would only ever put the first 16k into the buffer that gets read, so this 16k would get repeated until the size of the download. Task-number: QTBUG-74123 Change-Id: Ia53bedf6a8754d9fd83fd0ab62866cfa5af5cc1a Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Hpack - fix the static lookupTimur Pocheptsov2019-03-042-99/+121
|/ | | | | | | | | | | 'accept' breaks the order, making the static table unsorted and thus std::lower_bound cannot find it and we always index it in a dynamic table. Also, make this static table accessible to auto-test. Plus fix some warnings quite annoyingly visible in qt-creator. Fixes: QTBUG-74161 Change-Id: I47410f2ef974ac92797c9804aa55cb5c36a436c4 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.12.1' into 5.12" into ↵Qt Forward Merge Bot2019-02-061-1/+1
|\ | | | | | | refs/staging/5.12
| * Merge remote-tracking branch 'origin/5.12.1' into 5.12Qt Forward Merge Bot2019-02-061-1/+1
| |\ | | | | | | | | | Change-Id: I486f3c51df4b60fe60b75ba642636a835a75f731
| | * Fix corewlan configure testJoerg Bornemann2019-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Configure is unable to find header files that are located in frameworks. Work around that by specifying "include" on "test" level instead of "headers" on "corewlan" level. This amends commit 10adbc4f0f. Change-Id: I0650585eb9a4e881dc2e3733d8db40c6e50cf1f3 Fixes: QTBUG-72964 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Normalize some SIGNAL/SLOT signaturesJoerg Bornemann2019-02-063-5/+5
|/ / | | | | | | | | | | | | ...for a minor performance gain. Change-Id: I4bef867055e069926fdc24fa98a6f94b6a0630e2 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | http2: skip content-length for content-encoding: gzip/deflateTimur Pocheptsov2019-02-011-0/+4
| | | | | | | | | | | | | | | | | | The protocol handler now matches HTTP/1.1's protocol handler. Change-Id: Id55c10900e2bcd46e5dc65c63db77097eb4818b6 Fixes: QTBUG-73364 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Fix session resumption with OpenSSL 1.1André Klitzing2019-01-311-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenSSL 1.1.0 and higher requires SSL_shutdown to mark a session as resumable. QHttpNetworkConnection/Channel tries to re-use one shared SSL context (and the session) for its 'channels'. The session is marked as non-resumable without shutdown sent/received. This makes it useless for QHttpNetworkConnection. See: https://github.com/openssl/openssl/issues/1550 Fixes: QTBUG-71967 Change-Id: Iaaceb18c4c5a090f997f9850981a27f04f1f8b06 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | SecureTransport: do not set max protocol versionTimur Pocheptsov2019-01-271-12/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is similar to a change we approved recently in OpenSSL back-end. Similar to OpenSSL, not setting the upper limit on protocols allowed to negotiate/use, neatly ends up with the highest available, which is ... TLS 1.2 at the moment, but will silently switch to 1.3 etc. This was also recommended by Apple's engineer who closed a related bug report with 'Won't do' - "do not limit the max, you'll always have the real max supported'. Also, while at the moment we do not allow QSsl::TlsV1_3 and QSsl::TlsV1_3OrLater, if we managed to negotiate it - report it properly, not as 'Unknown'. Task-number: QTBUG-67463 Change-Id: I3f46ea525f06edca03259123809f3b7b1191b1ee Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Merge remote-tracking branch 'origin/5.12.1' into 5.12Qt Forward Merge Bot2019-01-232-1/+3
|\| | | | | | | Change-Id: Icebd151eae0cf9d400319a42573290d1a911ce26
| * Merge remote-tracking branch 'origin/5.12' into 5.12.1Liang Qi2019-01-085-37/+71
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/kernel/qtooltip.cpp Change-Id: Ic2f9a425359050eb56b3a4e5162cf5e3447058c8
| * | Doc: Fix linking errors qtbaseNico Vertriest2019-01-031-1/+1
| | | | | | | | | | | | | | | Change-Id: I225e59bea0a8eac14fd11ef2b091907ae955c447 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * | Work around FreeBSD 12.0 breaking source compatibility with IFM_FDDIThiago Macieira2019-01-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The macro disappeared. qnetworkinterface_unix.cpp:467:14: error: use of undeclared identifier 'IFM_FDDI'; did you mean 'IFT_FDDI'? Fixes: QTBUG-72775 Change-Id: I548dbfddb69b4fd6a0a3fffd1574e1ad4e670e5b Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | | Fix alignment-warnings about Q_DECLARE_PRIVATE's castsEdward Welbourne2019-01-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Q_DECLARE_PRIVATE gets used in the declaration of the public class, where the private class is typically visible only as a forward-decl, with no knowledge of what it's based on; consequently, the macro is obliged to use reinterpret_cast<>, which is subject to warnings when the compiler *can* see both types and their alignments differ. The same applies to Q_DECLARE_PRIVATE_D. So suppress gcc's -Wcast-align around the d_func() return statements. (If we get similar problems with other compilers we can add their suppressions likewise; but, for now, we've only seen this on MIPS64, where we use gcc.) This tripped over one use of Q_DECLARE_PRIVATE in a private Q_SLOTS: section; for some reason, gcc didn't like the semicolon on the friend declaration. Changing the context to plain private fixed that. Fixes: QTBUG-72885 Change-Id: I5edc11d46bd4eb820713adede79d53191a7e2736 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Boxiang Sun <daetalusun@gmail.com>
* | | Documentation: Add \nullptr macro and use where applicableFriedemann Kleint2019-01-102-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt for Python users reading the documentation assume that int(0) can be passed for pointer parameters. Use the newly introduced \nullptr to disambiguate this. In a follow-up step, the \nullptr macro can be defined as None when generating the Qt for Python documentation. Task-number: PYSIDE-903 Change-Id: I3a45f87175a0668ab5f3f95f0aff409f7e3ef027 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | wasm: fix blob download handlingLorn Potter2019-01-091-11/+16
| | | | | | | | | | | | | | | | | | Change-Id: I34a8ec05c18b15ed71787986b5b0316693235b4d Fixes: QTBUG-72105 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | Doc: Complete doc on QHostAddress::clear()Nico Vertriest2019-01-081-1/+2
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-31280 Change-Id: Ia9904433b0b67bead8831f2ef678b9598977df6b Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | QNetworkReplyHttpImpl::_q_startOperation - remove a useless warningTimur Pocheptsov2019-01-081-4/+2
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since it explains nothing and now, after some other bug was fixed (see, for example, c89d0f9d532), we trigger this message on the first request, which happens because: - 'createSession()' indeed, creates a session, compares a previous kwnon state (which happens to be 'Invalid') with a current state, which is 'Connected' and then invokes '_q_networkSessionStateChanged'. - '_q_networkSessionStateChanged()' on 'Connected' emits 'networkSessionConnected()' to which a newly-created QNetworkReplyHttpImpl will respond with it's _q_startOperation(). - QHttpNetworkReplyImpl will also try to 'open' a session, its 'opened()' signal will trigger, again, 'networkSessionConnected()' and ... the next _q_startOperation(). Now, not to add even more twisted spaghetti if/conditions with some unpredictable regressions, let's suppress a useless warning and silently return. We, indeed, in 'Working' state, let's keep working. Task-number: QTBUG-72463 Change-Id: I5282979920915ffded889c20b8ae740a46efef04 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Copy backend configuration while setting dtls configSona Kurazyan2019-01-051-0/+1
| | | | | | | | | | | | | | | | When setting dtls configuration, we should also copy backendConfig, otherwise this setting will be ignored. Change-Id: I4df53e8e6d8c2bd0eb7dddb9928b7883c401d60a Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Doc: fix typo in QAbstractSocket::bind documentationSamuel Gaist2019-01-031-1/+1
| | | | | | | | | | | | | | | | Fixes: QTBUG-72780 Change-Id: I16d89d29f573dba37ed8e1986ed9677117ca6aad Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | configure: inline openssl test sourcesOswald Buddenhagen2018-12-191-3/+23
| | | | | | | | | | Change-Id: I47c1c43b5db30cf1d59de9c6c20ca83abef2cf8c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | wasm: emit finished after QNetworkReply abortLorn Potter2018-12-182-10/+25
| | | | | | | | | | | | Change-Id: I23445f5e0c936b82aa5d65b261d456a563deab9a Fixes: QTBUG-72516 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | configure: inline corewlan testOswald Buddenhagen2018-12-171-1/+5
| | | | | | | | | | | | | | we have support for objc++ since 591edbb11. Change-Id: I5f430fd7c410913d4532627d18529b077f794035 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | configure: remove openssl placeholder sourceOswald Buddenhagen2018-12-171-6/+1
| | | | | | | | | | | | | | | | | | there is no particular reason to exclude static builds from the default. misses are cheap now, so it's fine if nothing is found. this affects only the legacy pre-1.1 library names under windows. Change-Id: I998b9f7bfcce42ec990a236bb44372c4d6b3f631 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | configure: adjust openssl lib names on mingwOswald Buddenhagen2018-12-171-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | both the mingw and msvc build have a "lib" prefix on the libraries. this makes the msvc build unconventional, so it needs an extra source. for the mingw build, otoh, this is the expected setup, so the source used for unix will work just fine. this doesn't fix any actual bug, because mingw will apparently resolve -llibfoo to libfoo.a even though only liblibfoo.a and libfoo.lib are documented (on mingw.org). however, this mix of conventions is ugly and should be avoided. Change-Id: I32b1621e4ac15db1f071c08ced738bfdafdcc11b Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | configure: optimize the openssl feature structureOswald Buddenhagen2018-12-171-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | don't run the openssl_headers test pointlessly when openssl-linked is selected but its test fails. implementing this cleanly required creating a separate openssl-runtime feature, including 'redirecting' the -openssl option (which is just an alias for -openssl-runtime) to it. simplify the openssl-linked conditions: while "anything but the value that enables it" in the 'disable' field effectively means "don't auto-detect it", it's better to be explicit about that. Change-Id: I6b117cc50711bb64d090fcfdb89ff009c60ed86c Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | wasm: do not revise url of queriesLorn Potter2018-12-161-9/+1
| | | | | | | | | | | | | | | | | | | | | | I think this may have been for some POST method form queries, but obviously was missing something. Task-number: QTBUG-72382 Change-Id: I59016776aeedf4b5599b3b44af70610babb0a61e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Ryan Chu <ryan.chu@qt.io>
* | configure: verify header presence against sourcesOswald Buddenhagen2018-12-141-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | in addition to the actual library resolution, also resolve the headers belonging to the library, to validate the include path, and possibly ensure that the right version of the library is present. the "include" entries were moved out of the "test" objects, and renamed to "headers". this cleanly permits libraries without compile tests. the headers were not put into the sources, because the variance among the includes is generally orthogonal to the variance among the libraries. note that this - like the library resolution - provides no support for darwin frameworks. consequently, the opengl libraries are excluded from the conversion on darwin. similarly, wasm is excluded (centrally), because emcc is magic and would need advanced wizardry to be dealt with. Change-Id: Ib390c75371efa2badcfec9b74274047ce67c3e5a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-12-101-9/+18
|\ | | | | | | Change-Id: If49df791f73e9edf616baa094e0f301a44cb853d
| * OpenSSL: also try the "1.0.2" sonameGiuseppe D'Angelo2018-11-291-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | Turns out that also Debian patches OpenSSL 1.0, changing its soname to "1.0.2". Therefore, try also to load that one. Amends 2708c6c11d685ab25c12d558961d924c9a4533d2. Task-number: QTBUG-68156 Change-Id: I37cc060e90422779a6c29a324ab900f0fb99cfa7 Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Revise filtering of Content-Length in HTTP cache controlEdward Welbourne2018-12-071-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We filter out Content-Length from the cache metadata due to IIS sending it bogusly on 304 responses; however, we were only doing this if the cached response had a Content-Length header, which doesn't happen when the original request was delivered chunked. Furthermore, the filtering wasn't limited to the case of 304 responses. So skip the "had it previously" requirement and only do this for 304s. Fixes: QTBUG-72035 Change-Id: Ie5d858e0f0205bf68f0a13a9c9d4a6e844cb3568 Reviewed-by: Joni Poikelin <joni.poikelin@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | configure: actually resolve libraries into full filepathsOswald Buddenhagen2018-12-032-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | this considerably speeds up failures, as no doomed build is attempted, and produces more reliable results, as no second lookup (which would be subject to environment changes) is done any more during the build. in principle, this also opens up possibilities like selecting specific variants of dependencies, automatically extracting rpaths, etc. qt_helper_lib.prf also needs to create fully resolved library names now. Change-Id: I65f13564b635433030e40fa017427bbc72d1c130 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | QNetworkConfiguration: add missing timeout unit to setConnectTimeout docSamuel Gaist2018-12-011-0/+2
| | | | | | | | | | Change-Id: I3738e989a41607244b55245222ec3c83dda68198 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | OpenSSL context (1.1) - make the if-fery/switch less uglyTimur Pocheptsov2018-11-301-7/+3
| | | | | | | | | | | | | | no need in duplicating DTLS-specific cases. Change-Id: I475c6fb53daa44d60a5054bf3acc8474355b2186 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Fix build errors in OpenSSL 1.1 backendTimur Pocheptsov2018-11-231-0/+2
| | | | | | | | | | | | | | | | SSL_CTX_set_ciphers is new in 1.1.1. Task-number: QTBUG-71983 Change-Id: If0ae9f95dcc867c62ed0d3a6a60c22c7f5e1cc9f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | qnetworkinterface_unix: Use qstrncpy instead of strlcpyDmitry Shachnev2018-11-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | strlcpy is not available on some UNIX platforms, such as GNU/kFreeBSD. qstrncpy is available everywhere and has similar semantics (in addition it fills the rest of buffer size with NULL bytes, but that does not cause extra work as our buffer sizes are small). Change-Id: I76c5905eba248fd9fbc1f63f05e88e0617f8407a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QLocalSocket (windows) - remove broken setErrorStringTimur Pocheptsov2018-11-222-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We report two types of errors - those found by our code and errors coming from the OS. setErrorString(), despite its name, does not just set a string, but extracts a windows error code via GetLastError() and then calls _q_winError(). This is wrong: some arbitrary error code (or no error) can be reported when it was actually an error found by Qt. Worse yet, string operations (allocations etc.) can potentially clear the real error code. So remove setErrorString(), set errors explicitly if it's the application code error or use _q_WinError directly. Task-number: QTBUG-71744 Change-Id: I67277d84006c4ad365f5636caf850e1f3ba4e1dc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-11-191-6/+4
|\| | | | | | | | | | | | | Conflicts: src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm Change-Id: I66a08c770767a93cd26535689e3e7806486aab06
| * QAbstractSocket::Bind: clarify some detailsEdward Welbourne2018-11-091-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | The function's documentation needlessly repeated parts of its first line. The BindFlag enum it takes as a parameter confused readers by saying an option is ignored on Windows, failing to make clear that it is so because that option is what Windows does by default. Tidied some phrasing and typos in the process. Fixes: QTBUG-52364 Change-Id: Ia6510caff7ec80216eefccf41fb009b1357e4b2e Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Merge remote-tracking branch 'origin/5.12.0' into 5.12Liang Qi2018-11-169-12/+125
|\ \ | | | | | | | | | Change-Id: Ic1dd39044e19f50e1068d4ac70dacaad6440e570
| * | Add missing protocol enumerators, report TLS 1.3 if negotiatedTimur Pocheptsov2018-11-079-12/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Remove the conditional inclusion of DTLS versions, they made difficult and unnecessary ugly adding new protocols (something like TlsV1_2OrLater + 4). 2. OpenSSL 1.1.1 first introduced TLS 1.3 support. OpenSSL 1.1 back-end is compatible with OpenSSL 1.1.1, but would fail to extract/report protocol versions and set versions like 'TLS 1.3 only' or 'TLS 1.3 or better' on a new context. Given 1.1.1 is deployed/adapted fast by different distros, and 5.12 is LTS, we fix this issue by introducing QSsl::Tls1_3 and QSsl::Tls1_3OrLater. SecureTransport, WinRT and OpenSSL below 1.1.1 will report an error in case the application requests this protocol (SecureTransport in future will probably enable TLS 1.3). Saying all that, TLS 1.3 support is experimental in QSslSocket. Done-by: Albert Astals Cid <albert.astals.cid@kdab.com> Done-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: I4a97cc789b62763763cf41c44157ef0a9fd6cbec Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Use timeout error for TCP timeouts on unixSven Erdem2018-11-111-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a TCP connection timed out a QAbstractSocket::NetworkError was set. To enable a more precise error handling for timeouts QAbstractSocket::SocketTimeoutError is now set instead. Separated ETIMEDOUT from other errors in nativeRead() and take over responsibility for setting the error, which was previously handled by read(). Change-Id: Iccd45bdbb3d944cd160ae50c257d3256e05b1ae5 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
* | | QSocks5SocketEngine: Remove too optimistic check for UDP proxy setupAlexander Akulich2018-11-071-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The engine used to send a UDP datagram to the local address to check the proxy setup, but the check fails in case of the proxy hosted in WAN and the local address hidden behind a NAT. In other words the check fails because a public proxy hosted somewhere in internet has no access to local addresses such as 192.168.1.2. Remove the check to fix the issue; we still have other means to detect network errors. Change-Id: Ib6df263c87ebd7d6e88a0b5e024e78a559995234 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Fix supportsSsl() to make it more consistentTimur Pocheptsov2018-11-023-4/+9
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attempts to use QSslSocket and its OpenSSL 1.1 back-end with OpenSSL 1.1.1 in a very peculiar way (for some reason the reporter calls OPENSSL_no_config()) combined with a bug in OpenSSL 1.1.1 resulted in a QSslSocket dead-locking in initialization. This was happening because supportsSsl() first reported false (OpenSSL internally fails to initialize after OPENSSL_no_config()), but we have s_libraryLoaded set to true too early, thus the first supportsSsl() returns false, the second - true. Move setting of s_libraryLoaded later so that we don't claim to support OpenSSL when an earlier ensureLibraryLoaded() attempt failed. Task-number: QTBUG-70956 Task-number: QTBUG-71446 Change-Id: I8ad8763d357c84fc38c62e2ce914366367c2b445 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-10-212-3/+25
|\| | | | | | | Change-Id: Iaf28977e7ecf566b28b9406dcb005d48621169c2
| * OpenSSL: force the "1.0.0" soname when loading OpenSSL 1.0Giuseppe D'Angelo2018-10-192-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some Linux distributions patch OpenSSL's soname, making builds on such distributions not deployable elsewhere. The problem is that the code loading OpenSSL symbols would attempt to use the soname of the build machine, and therefore not finding the OpenSSL libraries on the deploy system. The binary builds of Qt for Linux are affected by this problem, as they build under RHEL7.4 which changes to soname of OpenSSL to a non-standard string. This makes the binary builds not pick up OpenSSL 1.0 from the machine where the build gets installed on. Given that in the pre-1.1 versions only the 1.0 series is supported, bump the minimum requirement of Qt to that. The 1.0.x releases (up to 1.0.2, at the time of this writing) have kept binary compatibility, and advertise a soname of "1.0.0", which is used by most distributions. So, if loading of OpenSSL with the build-time soname fails, try to load them with the "1.0.0" hardcoded soname. [ChangeLog][QtNetwork][SSL] OpenSSL >= 1.0 is now required to build Qt with OpenSSL support. Task-number: QTBUG-68156 Change-Id: Ieff1561a3c1d278b511f09fef06580f034f188c6 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-10-171-0/+4
|\| | | | | | | | | | | | | | | Conflicts: src/plugins/platformthemes/platformthemes.pro src/printsupport/kernel/qplatformprintdevice.cpp Change-Id: Iac01729ad954bb1c7af5867d982eb243b2139ee6