Solved QtWebEngineWidget/demobrowser SSL connection problem
-
Hi, QT experts:
QT: 5.6
QPA: Wayland-EGL
Platform: TI AM437x GP EVM with ARM
OS: LinuxWe are trying to enable a chromium-based browser from QT.
We are able to build both QTWebEngine and QTWebChannel through Yocto and copy the images to the target file system. We are also be able to run QT example /webenginewidgets/demobrowser/demobrowser. The only problem is that the following error messages show up for any webpage."Server's certificate is not trusted".
It seems to be a SSL certificate problem and may be related to our NSS setting, but every thing we checked seem to be right.
/etc/ssl/certs/ca-certificates.crt
/etc/ca-certificates/update.d
/usr/share/ca-certificates/mozilla/.crt
root@am437x-evm:/etc/ca-certificates# ls /usr/lib/libnss
/usr/lib/libnss3.so /usr/lib/libnss_hesiod.so /usr/lib/libnssckbi.so
/usr/lib/libnss_compat.so /usr/lib/libnss_nis.so /usr/lib/libnssdbm3.chk
/usr/lib/libnss_db.so /usr/lib/libnss_nisplus.so /usr/lib/libnssdbm3.so
/usr/lib/libnss_dns.so /usr/lib/libnss_resolve.la /usr/lib/libnssutil3.so
/usr/lib/libnss_files.so /usr/lib/libnss_resolve.so.2We are sort of stuck now. Any input will be highly appreciated!
Best regards,
Eric
-
Hi, All:
We realized that the use_nss_certs was set to 0 due to the following code at src/core/config/linux.pri.
use?(nss) {
GYP_CONFIG += use_nss_certs=1
use_openssl_certs=0
} else {
GYP_CONFIG += use_nss_certs=0
use_openssl_certs=1
}We have troubled to figure out how to enable nss?
Any help will be highly appreciated?Best regards,
Eric
-
We are able to resolve this issue now. The QT build is configured to use openssl instead of nss and we need to set the following environment variable to get it working.
export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
For embedded Linux, add the line above at /etc/profile.d/qt_env.sh