Discussion:
[Qt-creator] Downloading Kate Highlighter Definitions
Jochen Becher
2018-09-21 18:19:41 UTC
Permalink
Hi,

Downloading Kate Highlighter definitions fails for me in Qt Creator
4.7.0. I get an error dialog: "Error connection to server" / "Not
possible to retrieve data.".

I checked the URL that is used (at least what my source code from
git/master says: "https://www.kate-editor.org/syntax/update-5.60.xml")
and it seems to be fine.

Known Issue?

Regards, Jochen
Eike Ziller
2018-09-24 06:52:16 UTC
Permalink
Post by Jochen Becher
Hi,
Downloading Kate Highlighter definitions fails for me in Qt Creator
4.7.0. I get an error dialog: "Error connection to server" / "Not
possible to retrieve data.".
I checked the URL that is used (at least what my source code from
git/master says: "https://www.kate-editor.org/syntax/update-5.60.xml")
and it seems to be fine.
Known Issue?
My guess:
Since it’s trying to use https, Qt needs to find OpenSSL (on Lin/Win). Qt’s method for finding that is not failsafe (to say the least), and it also isn’t made easy with the various incompatible versions of it.
I think Help > System Information from Qt Creator’s menu should show you some information about if and what SSL library is found.

--
Eike Ziller
Principal Software Engineer

The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin
***@qt.io
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
Jochen Becher
2018-09-24 18:12:15 UTC
Permalink
Hi,

QtCreator says "SSL is not supported". But I have packages libssl1.0.0,
libssl1.1 and openssl installed on Ubuntu 18.04. Anything I miss?

Why doesn't Qt or QtCreator deliver their own packages if finding a
system install is difficult?

System Information:

qt.network.ssl: QSslSocket: cannot resolve CRYPTO_num_locks
qt.network.ssl: QSslSocket: cannot resolve CRYPTO_set_id_callback
qt.network.ssl: QSslSocket: cannot resolve CRYPTO_set_locking_callback
qt.network.ssl: QSslSocket: cannot resolve ERR_free_strings
qt.network.ssl: QSslSocket: cannot resolve EVP_CIPHER_CTX_cleanup
qt.network.ssl: QSslSocket: cannot resolve EVP_CIPHER_CTX_init
qt.network.ssl: QSslSocket: cannot resolve sk_new_null
qt.network.ssl: QSslSocket: cannot resolve sk_push
qt.network.ssl: QSslSocket: cannot resolve sk_free
qt.network.ssl: QSslSocket: cannot resolve sk_num
qt.network.ssl: QSslSocket: cannot resolve sk_pop_free
qt.network.ssl: QSslSocket: cannot resolve sk_value
qt.network.ssl: QSslSocket: cannot resolve SSL_library_init
qt.network.ssl: QSslSocket: cannot resolve SSL_load_error_strings
qt.network.ssl: QSslSocket: cannot resolve SSL_get_ex_new_index
qt.network.ssl: QSslSocket: cannot resolve SSLv3_client_method
qt.network.ssl: QSslSocket: cannot resolve SSLv23_client_method
qt.network.ssl: QSslSocket: cannot resolve SSLv3_server_method
qt.network.ssl: QSslSocket: cannot resolve SSLv23_server_method
qt.network.ssl: QSslSocket: cannot resolve X509_STORE_CTX_get_chain
qt.network.ssl: QSslSocket: cannot resolve
OPENSSL_add_all_algorithms_noconf
qt.network.ssl: QSslSocket: cannot resolve
OPENSSL_add_all_algorithms_conf
qt.network.ssl: QSslSocket: cannot resolve SSLeay
qt.network.ssl: Incompatible version of OpenSSL

Regards, Jochen
Post by Eike Ziller
Post by Jochen Becher
Hi,
Downloading Kate Highlighter definitions fails for me in Qt Creator
4.7.0. I get an error dialog: "Error connection to server" / "Not
possible to retrieve data.".
I checked the URL that is used (at least what my source code from
git/master says: "https://www.kate-editor.org/syntax/update-5.60.xm
l")
and it seems to be fine.
Known Issue?
Since it’s trying to use https, Qt needs to find OpenSSL (on
Lin/Win). Qt’s method for finding that is not failsafe (to say the
least), and it also isn’t made easy with the various incompatible
versions of it.
I think Help > System Information from Qt Creator’s menu should show
you some information about if and what SSL library is found.
--
Eike Ziller
Principal Software Engineer
The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht
Charlottenburg, HRB 144331 B
Aleksey Kontsevich
2018-09-24 18:19:50 UTC
Permalink
_______________________________________________
Qt-creator mailing list
Qt-***@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator
Eike Ziller
2018-09-25 06:58:41 UTC
Permalink
Post by Jochen Becher
Hi,
QtCreator says "SSL is not supported". But I have packages libssl1.0.0,
libssl1.1 and openssl installed on Ubuntu 18.04. Anything I miss?
As far as I remember the issue basically boils down to:
If Qt doesn’t find the _exact_ versions of libssl/crypto that Qt was compiled against (includes patch level), it first tries to find libssl/crypto without any version number in the file name, and then it loads the highest libssl/crypto that is on the system, even if Qt was compiled against 1.0 and 1.0 is installed on the system.

Code is in http://code.qt.io/cgit/qt/qtbase.git/tree/src/network/ssl/qsslsocket_openssl_symbols.cpp#n748 (loadOpenSsl)
A workaround for you could be to create symlinks libssl.so / libcrypto.so to your 1.0 libs.
Post by Jochen Becher
Why doesn't Qt or QtCreator deliver their own packages if finding a
system install is difficult?
It is not really that difficult, it is just broken in Qt ;) https://bugreports.qt.io/browse/QTBUG-68971
Qt could also just try loading all libraries in order newest to oldest, and just take whatever succeeds loading…

When we start shipping OpenSSL we start being responsible for security issues in it.

But what we should do is better reporting to the user, and possibly asking the user if we should fall back to trying http in that case.

Br, Eike
Post by Jochen Becher
qt.network.ssl: QSslSocket: cannot resolve CRYPTO_num_locks
qt.network.ssl: QSslSocket: cannot resolve CRYPTO_set_id_callback
qt.network.ssl: QSslSocket: cannot resolve CRYPTO_set_locking_callback
qt.network.ssl: QSslSocket: cannot resolve ERR_free_strings
qt.network.ssl: QSslSocket: cannot resolve EVP_CIPHER_CTX_cleanup
qt.network.ssl: QSslSocket: cannot resolve EVP_CIPHER_CTX_init
qt.network.ssl: QSslSocket: cannot resolve sk_new_null
qt.network.ssl: QSslSocket: cannot resolve sk_push
qt.network.ssl: QSslSocket: cannot resolve sk_free
qt.network.ssl: QSslSocket: cannot resolve sk_num
qt.network.ssl: QSslSocket: cannot resolve sk_pop_free
qt.network.ssl: QSslSocket: cannot resolve sk_value
qt.network.ssl: QSslSocket: cannot resolve SSL_library_init
qt.network.ssl: QSslSocket: cannot resolve SSL_load_error_strings
qt.network.ssl: QSslSocket: cannot resolve SSL_get_ex_new_index
qt.network.ssl: QSslSocket: cannot resolve SSLv3_client_method
qt.network.ssl: QSslSocket: cannot resolve SSLv23_client_method
qt.network.ssl: QSslSocket: cannot resolve SSLv3_server_method
qt.network.ssl: QSslSocket: cannot resolve SSLv23_server_method
qt.network.ssl: QSslSocket: cannot resolve X509_STORE_CTX_get_chain
qt.network.ssl: QSslSocket: cannot resolve
OPENSSL_add_all_algorithms_noconf
qt.network.ssl: QSslSocket: cannot resolve
OPENSSL_add_all_algorithms_conf
qt.network.ssl: QSslSocket: cannot resolve SSLeay
qt.network.ssl: Incompatible version of OpenSSL
Regards, Jochen
Post by Eike Ziller
Post by Jochen Becher
Hi,
Downloading Kate Highlighter definitions fails for me in Qt Creator
4.7.0. I get an error dialog: "Error connection to server" / "Not
possible to retrieve data.".
I checked the URL that is used (at least what my source code from
git/master says: "https://www.kate-editor.org/syntax/update-5.60.xm
l")
and it seems to be fine.
Known Issue?
Since it’s trying to use https, Qt needs to find OpenSSL (on
Lin/Win). Qt’s method for finding that is not failsafe (to say the
least), and it also isn’t made easy with the various incompatible
versions of it.
I think Help > System Information from Qt Creator’s menu should show
you some information about if and what SSL library is found.
--
Eike Ziller
Principal Software Engineer
The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht
Charlottenburg, HRB 144331 B
--
Eike Ziller
Principal Software Engineer

The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin
***@qt.io
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
Orgad Shaneh
2018-09-25 07:26:00 UTC
Permalink
Post by Eike Ziller
But what we should do is better reporting to the user, and possibly asking
the user if we should fall back to trying http in that case.
If I recall correctly, this won't help on this case, as http redirects to
https...

- Orgad
Loading...