Solved Qt 5.8 QNAM openssl crash (OPENSSL_THREADS?)
-
there was much discussion on HowTo include openssl
finally I got it run as you probably know
here's my repo to build openssl libraries for Qt 5.7
https://github.com/ekke/android-openssl-qttoday sent out a complex Qt 5.8 QQC2 App to customer to test
if user of app does log-in some data will be downloaded from REST server
I'm firing some server requests, then wait until all are processedfrom time to time it happens that the APP is crashing with
F libc : md_rand.c:327: ssleay_rand_add: assertion "md_c[1] == md_count[1]" failed F libc : Fatal signal 6 (SIGABRT), code -6 in tid 10989 (QtThread)
or with
F libc : md_rand.c:327: ssleay_rand_add: assertion "md_c[1] == md_count[1]" failed F libc : Fatal signal 6 (SIGABRT), code -6 in tid 15952 (QNetworkAccessM)
I googled and found
http://marc.info/?l=openssl-users&m=117861757322237&w=2
seems I must compile openssl with OPENSSL_THREADS
who knows what I should change in build-all-arch.sh and will this be safe together with Qt 5.8 ?
thx helping
-
@ekkescorner found another makefile (https://gist.github.com/rvagg/3ab9a1a7e16b576caef5)
in my https://github.com/ekke/android-openssl-qt/blob/master/build-all-arch.sh
probably I should insert -DOPENSSL_THREADS here:xCFLAGS="-DSHARED_EXTENSION=.so -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -DDSO_DLFCN -DHAVE_DLFCN_H -mandroid -I$ANDROID_DEV/include -B$ANDROID_DEV/$xLIB -O3 -fomit-frame-pointer -Wall"
see also here: https://github.com/ekke/android-openssl-qt/commit/39d3d4122a132f1f73f7e7ed079de3f067775dde
-
@ekkescorner found another makefile (https://gist.github.com/rvagg/3ab9a1a7e16b576caef5)
in my https://github.com/ekke/android-openssl-qt/blob/master/build-all-arch.sh
probably I should insert -DOPENSSL_THREADS here:xCFLAGS="-DSHARED_EXTENSION=.so -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -DDSO_DLFCN -DHAVE_DLFCN_H -mandroid -I$ANDROID_DEV/include -B$ANDROID_DEV/$xLIB -O3 -fomit-frame-pointer -Wall"
see also here: https://github.com/ekke/android-openssl-qt/commit/39d3d4122a132f1f73f7e7ed079de3f067775dde
-
@ekkescorner Just built openssl again with -DOPENSSL_THREADS
couldn't reproduce the crash anymore :)
tomorrow will send out to customer to test againwill let you know if all works now
-
@ekkescorner got confirmation from customer immediately: crash seems to be fixed :)
I updated the repo: https://github.com/ekke/android-openssl-qt
see details:
https://github.com/ekke/android-openssl-qt/commit/39d3d4122a132f1f73f7e7ed079de3f067775ddeekke
-
@ekkescorner , thanks for your done, my work also need support https but in some Android device don't have built-in openssl .
-
With some minor changes... worked for me!
No issues with Android 7.0 anymore.Kudos to Ekkescorner for making this easy and accessible!
--SamG