Details
-
Bug
-
Resolution: Invalid
-
P1: Critical
-
None
-
5.4.1
-
None
-
Android 6.0, LG Nexus 5
compiled using Qt5.4.1, android_armv5, android-ndk-r10
Description
SSL Connection crashes all the time in Android 6 (tested only with one device so far)
test.cpp
QSslSocket::supportsSsl() // true QSslSocket::sslLibraryVersionString(); // "BoringSSL" QSslSocket::sslLibraryBuildVersionString(); // "OpenSSL 1.0.1j 15 Oct 2014" QSslSocket sslSocket; sslSocket.setProtocol(QSsl::SecureProtocols); QSslCertificate cert = QSslCertificate(ourcacert); QList<QSslCertificate> certs; certs.append(cert); sslSocket.setCaCertificates(certs); sslSocket.connectToHostEncrypted("xyz.com", 443); bool res = sslSocket.waitForConnected(); // place where it crashes ...
Error happens even if I do non blocking connection, dumps are same, only difference in non blocking it comes from EventLoop, in blocking it crashes immediately
.... SIGSEGV 1 libcrypto.so + 0x5fa57 Found by: stack scanning 2 libcrypto.so + 0x64101 Found by: stack scanning 3 libcrypto.so + 0x640bf Found by: stack scanning 4 libQt5Network.so!__bswapsi2 + 0x1d0ca Found by: stack scanning 5 libQt5Network.so!_ZNK15QSslCertificate23subjectAlternativeNamesEv + 0x73be Found by: stack scanning 6 libQt5Network.so!_ZNK15QSslCertificate23subjectAlternativeNamesEv + 0x842 Found by: stack scanning 7 libc.so + 0x75592 Found by: stack scanning 8 libQt5Network.so!_ZNK15QSslCertificate23subjectAlternativeNamesEv + 0x334a Found by: stack scanning 9 libc.so + 0x75592 Found by: stack scanning 10 libQt5Network.so!_ZNK15QSslCertificate23subjectAlternativeNamesEv + 0x4646 Found by: stack scanning 11 libQt5Network.so!_ZN10QSslSocket11modeChangedENS_7SslModeE + 0x2a Found by: stack scanning 12 libQt5Network.so!_ZN10QSslSocket21startClientEncryptionEv + 0xca Found by: stack scanning 13 libQt5Network.so!_ZN10QSslSocket19waitForDisconnectedEi + 0x232 Found by: stack scanning 14 libQt5Network.so!_ZN10QSslSocket23addDefaultCaCertificateERK15QSslCertificate + 0x256 ....
this logic worked fine until Android 6.
Attachments
Issue Links
- duplicates
-
QTBUG-49320 Crash in Qt network in Android 6
-
- Closed
-
- relates to
-
QTBUG-52109 Starting with Android 6.0, google ditched openssl and switched to their own SSL implementation
-
- Closed
-