When we load DER-encoded keys in the openssl-backend we always turn it
into PEM-encoded keys (essentially we prepend and append a header and
footer and use 'toBase64' on the DER data).
The problem comes from the header and footer which is simply chosen
based on which key algorithm was chosen by the user. Which would be
wrong when the key is a PKCS#8 key. This caused OpenSSL to fail when
trying to read it. Surprisingly it still loads correctly for unencrypted
keys with the wrong header, but not for encrypted keys.
This patch adds a small function which checks if a key is an encrypted
PKCS#8 key and then uses this function to figure out if a PKCS#8 header
and footer should be used (note that I only do this for encrypted PKCS#8
keys since, as previously mentioned, unencrypted keys are read correctly
by openssl).
The passphrase is now also passed to the QSslKeyPrivate::decodeDer
function so DER-encoded files can actually be decrypted.
[ChangeLog][QtNetwork][QSslKey] The openssl backend can now load
encrypted PKCS#8 DER-encoded keys.
Task-number: QTBUG-17718
Change-Id: I52eedf19bde297c9aa7fb050e835b3fc0db724e2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Properly handle single protocol TLS configurations. Previously,
due to the use of generic (non version-specific) client/server method
they worked as ranges of protocols instead. This also fixes a couple
of previously broken tests.
Task-number: QTBUG-67584
Change-Id: Ied23113a4fab6b407a34c953e3bd33eab153bb67
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
With SSE2 or NEON interpolate_4_pixels is faster than
interpolate_4_pixels_16, and using it saves a branch of duplicated code.
Similar changes had already been done other places it was used, those
have been updated to follow a similar logic.
Change-Id: I040d96480f7f925f659602f66f931d28b59312a5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This reduces the timeout from 10 seconds to the default 5, but the tested events
(resize events, painting) seem like something that should happen in 5 seconds.
Change-Id: I1d12372f37264bf7be64096e43813cd03f567102
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
BuiltIn inputs shouldnt be translated into a code input. We comment the
input line for this variables
Change-Id: I3b7d2fd06afc6a122d90a999fc5a5246fc93234e
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
the option is a quad enum, with "yes" meaning "either system or qt". the
distinction is made only in the "system-xcb" feature, while "xcb" itself
must be forced on in the "yes" case.
Task-number: QTBUG-67251
Change-Id: Ib706e79a902ae0f1b64ca6d4611c9214b7b7e928
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
that way we can create a config.log which is consistent with the end
state even if (some) tests are not executed this time around.
Change-Id: Ia953ede62d6640aab912559f435ceb1f9ec6d9dc
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The cost for the pixmap cache was calculated in bytes but
setCacheLimit() takes the size in kilobytes. This lead to the
situation that all values above 2097152 overflowed and disabled
the caching completely. Fix it by calculating the cost in
kilobytes as it is done in QGLContext.
Task-number: QTBUG-45293
Change-Id: Ib8dc2360c8f3201ce0b615a04c38b5ccaa8fc6cf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
It seems that's the only place we were doing any check.
We can remove it since it's not supposed to happen, and
it would have crashed already if it had.
Change-Id: Ic2034d2d278899f30a7d07284057e63a12e8eb10
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The iOS event dispatcher has been split into two; one dealing with the
QPA event processing, which we should always do, and one dealing with
the longjumping that we do when running the user's main on a separate
stack.
Change-Id: I1f819db33c608aad130ff23cbbadcf84363a32d2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Add functions for converting QImage to HBITMAP and back
supporting additional formats of QImage (RGB888, RGB555,
Indexed8 and Mono). Add test with roundtrip to tst_qimage similar
to tst_QPixmap::toWinHBITMAP().
Task-number: QTBUG-51124
Change-Id: Ib568898e7162686bfa527d828785628eb0b78e21
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
It's useful when you need to check how long a hash will be without first
generating one.
[ChangeLog][QtCore][QCryptographicHash] Add a static method, hashLength,
which returns the length of the output of a hash function in bytes.
Change-Id: Id6a454016523de83d157fd95c50105c6db4bb1d9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
On platforms where integer by default is int32(max is 2147483647) and
(1 << (' ' - 1)) will be 2147483648
Change-Id: I790d33bd4e473925d6897dd87cbffdfe8dd7938f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The merge in 0f315adf91 resulted in keeping both code paths,
in effect sending two touch events for each native touch event,
and also re-introduced the bug fixed by sending the touch events
asynchronously in some cases.
Change-Id: Id81f02d9597f4e0baeaddbdf9057fa32b6c31b2f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The test was failing because the files it expected to create were not actually
visible on the disk.
This was because 189e9c93d7 made QTemporaryFile
use unnamed files if the file name is not actually requested. Fix by forcing the
temporary file to be made with the requested name.
CI has not caught this because the test executable is marked insignificant_test
on Linux.
Change-Id: Ibe0244fdfcc66acf3be4314da51b4c0b3b520b71
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
- Remove unused createVisualInfoForDefaultVisualId() function.
This amends dff3c0f14f.
- Inline QXcbConnection::xlib_display().
- Don't nest QT_CONFIG(xcb_native_painting) in QT_CONFIG(xcb_xlib).
configure.json already checks for the dependencies, we don't need
to do that again in *.h/*.cpp.
Change-Id: If39912e67ce9baa31faf091bebe120bac5cf6876
Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Remove references to XKB and explain what to do if
pkg-config is missing or unwanted.
Change-Id: I099bf01ff49e1b8f6e822a50f0fe4904965a7a9f
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
- Pass QXcbBackingStoreImage a pointer to QXcbBackingStore. This
allow for simpler QXcbBackingStoreImage ctor.
- Use member initializers.
Change-Id: Ia992390060bb30e1184813cd0d115a8bf0fbc237
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
QXcbShmImage to QXcbBackingStoreImage as it is an image that
might or might not have SHM capability. The current name implies
that it always uses SHM.
QXcbShmGraphicsBuffer to QXcbGraphicsBuffer as it has nothing to
do with SHM.
Change-Id: I57ced75891e8b10515142769278a7f3f40da91ef
Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The configure unification accidentally changed it to /usr/local as used on
unix. Use C:/Qt again.
Task-number: QTBUG-61373
Change-Id: I758c639bdb07c97b55f990821e73a5135038f4a0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The 0 values should be default for X,Y both on plane and crtc.
But atomic implementation can have flaws on some devices so
we don't assume they are defaulted right and set them to 0.
Change-Id: I2f7dc98fdba523eb46eb86b97568d18b6cfd1277
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Change the toString description to reflect that the listed types are not
exclusive, and update see also link to link to the canConvert method
that includes conversion table.
Task-number: QTBUG-67174
Change-Id: I3ad2889c98a235995b94a2d0496a6fb8c024b7bb
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Except RHEL-6.6 and 7.4
It was blacklisted in f3939d943e, along
with a lot of other entries. No specifics are known about why it was
blacklisted originally, but now it only fails on RHEL because they
use OpenSSL 1.0.1.
Change-Id: I6d1d1b7b7bf5386b2115b8780163550cf03bbad7
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
On platforms where integer by default is int32(max is 2147483647) and
(1 << 31) will be 2147483648
Change-Id: I59ccb5344d5ad7d085f01bbc7cebdf6152ff7755
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It would previously only enable TLS v1.0, but it should also enable
SSL v3. According to Microsoft's documentation[0] that is exactly what
"SocketProtectionLevel_Ssl" does.
[0]: https://docs.microsoft.com/en-us/uwp/api/windows.networking.sockets.socketprotectionlevel
Change-Id: Id48f1ad310d994b8379116c9fa2102db858d7f69
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
On Wayland, manipulating the clipboard requires an input event serial, which is
not possible to get unless the compositor sends us input events.
Change-Id: If5231a5db85f8d6ad988ea93f240cee0c3466f9f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This makes the tests pass on Wayland compositors that don't automatically give
focus to newly created windows. Such as a headless Weston, which is very useful
for testing.
Task-number: QTBUG-66846
Change-Id: I502504b333499c89be193a3ebc19d41264a13580
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
- added screenshot
- some modifications to the text
Task-number QTBUG-60635
Change-Id: I57b269f93cdba696b424b5ba008d0f46ac612cda
Reviewed-by: Martin Smith <martin.smith@qt.io>
If large debug strings are received, the application should not crash,
but the file mapping's size should be increased accordingly.
To signal the need for a bigger mapping to the client, the new message
type was introduced. If winrtrunner receives a message with this type,
it will close the file mapping so that a new one can be created.
Task-number: QTBUG-61911
Change-Id: I3d5b5770870257a965b80e369975d3869e9a5446
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
When winrtrunner is used to debug winrt applications, debug messages
should be acknowledged by winrtrunner. Otherwise it is possible, that
2 messages are sent (and their event set) before winrtrunner reacted.
In this case the first message was lost and the second message shown
twice.
Change-Id: Ib1c6f87aad0c0da1761be5bf467edf8d4476c5e3
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
The code can be accessed from several threads and thus should be
protected.
Change-Id: I38c67c5d0f9b1658da1d0ae45d3ea79bbe4e8dff
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>