FS#19175 - [qca] kopete and psi not able to connect to jabber/xmpp (openfire)
Attached to Project:
Arch Linux
Opened by lazx (lazx888) - Monday, 19 April 2010, 17:37 GMT
Last edited by Andrea Scarpino (BaSh) - Tuesday, 06 November 2012, 21:58 GMT
Opened by lazx (lazx888) - Monday, 19 April 2010, 17:37 GMT
Last edited by Andrea Scarpino (BaSh) - Tuesday, 06 November 2012, 21:58 GMT
|
Details
Description:
Both Kopete and psi depend on qca - neither clients are able to connect to openfire xmpp server. Connection to gtalk is working. Connecting with pidgin to openfire is working. Error message: Unknown signature value: 795 Additional info: kdenetwork-kopete 4.4.2-2 psi 0.14-3 qca 2.0.2-2 qca-ossl 2.0.0-3 qca-gnupg 2.0.0-1 ca-certificates 20090814-3 Steps to reproduce: 1) If I remember correctly, the problem started to occur upon upgrade of ca-certificates/qca-ossl... But I have downgraded both, and get a complaint in kopete and psi about having not tls support. 2) Connect to openfire with client that uses qca. |
This task depends upon
<quote>
$ psi
qca-gnupg: disabling keyring monitoring due to buggy Qt version
Unknown signature value: 795
Unknown signature value: 795
Unknown signature value: 795
</quote>
Three jabber accuounts work (including talk.google.com), but one (internal corporative, based on ejabberd) doesn't work. It tryes to connect several minutes and then sometimes displays error dialog without any useful message.
$ pacman -Q psi qt qca qca-gnupg qca-ossl
psi 0.14-3
qt 4.6.2-4
qca 2.0.2-2
qca-gnupg 2.0.0-1
qca-ossl 2.0.0-3
Kopete on gentoo works fine with my work's intranet Openfire server, and Arch's doesn't. I am not some newbie or clueless user who doesn't know what they are doing, leave this bug open so that when I find a solution other people can find it in the same place if you aren't willing to do anything about it.
Here are some observations when connecting to my _openfire_ xmpp server:
Case 1 - Jabber id domain different than server domain (custom server (override default server information)) + SSL
Jabber id: user@gmail.com
Server: mydomain.org port: 5222
Result:
- "Unknown signature value: 795"
- Kopete DOES NOT prompt me to accept self signed certificate.
Case 2 - Jabber id domain equal to server domain + SSL
Jabber id: user@mydomain.org
Server: default settings
Result:
- No complaint about "Unknown signature value: 795"
- Kopete DOES prompt to accept self signed certificate.
- Kopete asks for password, fails to sign on, prompts again to accept self signed certificate, fails to sign on, asks for password, repeat.
Case 3 - NO SSL
Jabber id: user@mydomain.org
Server: default settings
Result:
- "Unknown signature value: 795"
- Kopete DOES prompt to accept self signed certificate... even though ssl has been unchecked (And openfire has "Optional - Clients may connect to the server using secured connections" enabled)
- Kopete asks for password, fails to sign on, prompts again to accept self signed certificate, fails to sign on, asks for password, repeat.
So there is obviously some conflict between certificates (maybe only self signed ones, as connection to Gtalk (jabber/ssl) works fine....? I'll look into getting my certificate signed and report back).
Pidgin and kopete on opensuse are working.
Kopete on arch linux/kde 4.5 (testing) is not working.
Is there any more information that I can try to provide to finally axe this bug...?
Thanks guys.
This bug report led me to the solution: https://support.process-one.net/browse/EJAB-877
See the attached patch for qca-ossl. Reading through EJAB-877, it looked like adding SSL_OP_NO_TICKET to the SSL context would resolve the issue, but for whatever reason, this didn't work for me. I'm not sure why. For the heck of it, I then tried changing the SSL method from SSLv23_server_method() to SSLv3_server_method(), which seems to have fixed the problem. I'm able to connect to SSLv3 servers as well as TLSv1 servers. I don't know what the OpenSSL-internal difference is between SSLv23_server_method() and SSLv3_server_method(), besides the obvious fact that one permits SSLv2, SSLv3, and TLSv1, while the other permits only SSLv3 and TLSv1. Perhaps this has something to do with SSLv2 being thrown out of OpenSSL 1.x? Anyway. See if the above fixes the issue for you folks. It's a starting point, anyway.
At least one report of this patch working with some unspecified client/protocol: https://bugs.kde.org/show_bug.cgi?id=221533
Oddly enough, Psi (which also depends on qca/qca-ossl) works fine with patched and unpatched qca-ossl (2.0.0-3).
The "unknown signature value" errors aren't fatal, by the way. They're printed whenever the CSR (not applicable), CRL, or certificate has a signature method that qca-ossl isn't aware of. What _really_ matters is that OpenSSL is aware of it.
Looking up 795, it seems that qca-ossl didn't understand what a DSA with SHA384 signature is:
tycho@mjollnir /usr/include/openssl $ grep 795 *
obj_mac.h:#define NID_ecdsa_with_SHA384 795
But whatever, like I said, it's not a fatal error.
You should probably add some debug printouts to find the real critical error. Chances are that SSL_get_error() returns SSL_ERROR_SSL at some point during the Connect, Accept or Handshake stages, and you need to know what the exact error was. Try the attached patch and see what Kopete prints to stderr then.
Let me know what you get out of Kopete with this.
Have played around with the setup of the ssl context with no success. Ideas?
Do you have any experience with this error? Thanks Steven.
Leave both patches applied but don't make any of your own changes (if something breaks, let me know what it is), then watch the stderr output from Kopete/Psi.
Both Kopete and Psi return the same output with your patched qca-ossl: "Unknown signature value: 795". Psi connects, kopete does not.
With some small changes (only print statements), maybe some more interesting output:
Kopete output (fails to connect):
Unknown signature value: 795
doConnect: SSL_get_error returned 2.
Unknown signature value: 795
doConnect: SSL_get_error returned 2.
Unknown signature value: 795
doConnect: SSL_get_error returned 2.
Unknown signature value: 795
doConnect: SSL_get_error returned 2.
Psi's output (connects fine):
Unknown signature value: 795
doConnect: SSL_get_error returned 2.
doConnect: SSL_get_error returned 2.
doConnect: SSL_get_error returned 2.
in doHandshake
May I ask what the address is of the Jabber server you're using? I'd like to see if I can debug it locally.
(And I think I need to add a debug printout for what protocol and cipher are being used. We need to pinpoint the differences here in everyone's case.)
Unknown signature value: 795
Unknown signature value: 795
etc.
I rebuilt openssl with the patch then qca-ossl with the qca-ossl-debug.patch. Can upload the PKGBUILD sources I modified to the AUR if anyone wants them.
I started kopete on the command line like this:
kopete
Did I miss something? I was expecting more output.
The output there doesn't make sense if the SSL/TLS negotiation failed, and the qca-ossl-debug.patch has been applied. The qca-ossl-debug.patch prints out detailed error messages if something blows up during the negotiation process. Are you sure you applied the patch and ran kopete with that version of qca-ossl?
Same behaviour.
% strings /usr/lib/qt/plugins/crypto/libqca-ossl.so | grep "SSL_get_error"
gives:
SSL_get_error
SSL_get_error returned %d.
qca-ossl PKGBUILD: http://pastie.org/1235530
How is Kopete behaving? Does it say SSL/TLS negotiation failed? I ask because it should have printed out an error if it didn't negotiate properly. It's entirely possible you're hitting a different bug altogether.
I tried applying gentoo qca-ossl/openssl patches but with no help.
I still get "Unknown signature value: 795" but it connects anyway.
If Psi works, it's a Kopete thing. Now we just need to discover why. Is Kopete statically linked to qca-ossl or OpenSSL, perhaps?
That would mean the qca-ossl-debug patch would have no effect until recompiling kopete. In addition since kopete uses ssl through qca-ossl it wouldn't pick up the openssl fix.
Then again kopete might dlopen libqca at runtime.. I'm not sure.
I could nm for common symbols but I'm recompiling kopete right now.
With this package (instead openssl from repository) psi-plus and kopete works normally
1. t1_lib.c.patch cannot be applied to the newest openssl. As I looked at code it seems to be applited little other way. -> No patching needed.
2. qca-ossl-fix.patch, which in fact looks like a workaround WORKS, but...
* to get PSI working: as long as PSI is dynamically linked to libqca, you just have to install patched version of this package and you're done.
* to get kopete working: after installing patched qca-ossl, you have to recompile kopete (in fact, whole kdenetwork which kopete is part of).
Hope that helps someone.