timiimit / UT4UU-Public

Unreal Tournament 4 Unofficial Update
73 stars 1 forks source link

Cannot see online friends on linux #6

Closed timiimit closed 1 year ago

timiimit commented 1 year ago

Describe the bug After logging in on Linux, all friends stay offline when UT4UU Installer installs everything.

To Reproduce Steps to reproduce the behavior:

  1. Install UT4UU (with everything) on linux
  2. Start the game
  3. Log in

Expected behavior You should be able to see which friends are online and interact with them.

System Information (please complete the following information):

timiimit commented 1 year ago

This happens because XMPP fails to verify server certificate via TLS

timiimit commented 1 year ago

Has started happening because #2 was fixed.

timiimit commented 1 year ago

Actually, the friends list does not even open atm. These are relevant logs:

[2022.11.24-16.46.06:326][937]LogXmpp: Starting Login on connection
[2022.11.24-16.46.06:326][937]LogXmpp:   Server = xmpp-service-prod.ol.epicgames.com:5222
[2022.11.24-16.46.06:326][937]LogXmpp:   User = 0b0f09b400854b9b98932dd9e5abe7c5@prod.ol.epicgames.com/V2:UnrealTournamentDev:::049629ED060B1118002E014624320BAA
[2022.11.24-16.46.06:326][937]LogXmpp: Starting Strophe XMPP thread
[2022.11.24-16.46.06:331][937]LogXmpp:VeryVerbose: libstrophe[35578] xmpp debug: Connecting via altdomain.
[2022.11.24-16.46.06:331][937]LogXmpp:Verbose: Xmpp connection thread is exiting
[2022.11.24-16.46.06:331][937]LogXmpp:VeryVerbose: Resetting timer for Client-To-Server XMPP Ping
[2022.11.24-16.46.06:331][937]LogXmpp:VeryVerbose: Resetting timer for Client-To-Server XMPP Pong
[2022.11.24-16.46.06:331][937]LogXmpp: Strophe processing LoginStatus change Was: NotStarted Now: ProcessingLogin
[2022.11.24-16.46.06:356][944]LogXmpp:VeryVerbose: libstrophe[35578] xmpp debug: sock_connect() to xmpp-service-prod.ol.epicgames.com:5222 returned 297
[2022.11.24-16.46.06:356][944]LogXmpp:VeryVerbose: libstrophe[35578] xmpp debug: Attempting to connect to xmpp-service-prod.ol.epicgames.com
[2022.11.24-16.46.06:461][969]LogXmpp:VeryVerbose: libstrophe[35578] xmpp debug: connection successful
[2022.11.24-16.46.06:465][970]LogXmpp:VeryVerbose: libstrophe[35578] conn debug: SENT: <?xml version="1.0"?><stream:stream to="prod.ol.epicgames.com" xml:lang="en" version="1.0" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams">
[2022.11.24-16.46.06:569][995]LogXmpp:VeryVerbose: libstrophe[35578] xmpp debug: RECV: <stream:stream from="prod.ol.epicgames.com" id="d2fd8866-46f3-4d3a-b41c-bd37e501fd05" version="1.0" lang="en">
[2022.11.24-16.46.06:573][996]LogXmpp:VeryVerbose: libstrophe[35578] xmpp debug: RECV: <features xmlns="http://etherx.jabber.org/streams"><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/><ver xmlns="urn:xmpp:features:rosterver"/><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required/></starttls><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression></features>
[2022.11.24-16.46.06:577][997]LogXmpp:VeryVerbose: libstrophe[35578] conn debug: SENT: <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
[2022.11.24-16.46.06:685][ 23]LogXmpp:VeryVerbose: libstrophe[35578] xmpp debug: RECV: <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
[2022.11.24-16.46.06:686][ 23]LogXmpp:VeryVerbose: libstrophe[35578] xmpp debug: handle proceedtls called for proceed
[2022.11.24-16.46.06:686][ 23]LogXmpp:VeryVerbose: libstrophe[35578] xmpp debug: proceeding with TLS
[2022.11.24-16.46.06:794][ 49]LogXmpp:VeryVerbose: libstrophe[35578] tls debug: preverify_ok:0
Subject: /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert Global Root G2
Issuer: /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert Global Root G2
[2022.11.24-16.46.06:794][ 49]LogXmpp:Warning: Certificate verification failure: self signed certificate in certificate chain
[2022.11.24-16.46.06:794][ 49]LogXmpp:Warning: Issuer: /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert Global Root G2
[2022.11.24-16.46.06:794][ 49]LogXmpp:Warning: Subject: /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert Global Root G2
[2022.11.24-16.46.06:794][ 49]LogXmpp:Warning: Fingerprint SHA256: cb3ccbb76031e5e0138f8dd39a23f9de47ffc35e43c1144cea27d46a5ab1cb5f
[2022.11.24-16.46.06:794][ 49]LogXmpp:Warning: Fingerprint SHA1: df3c24f9bfd666761b268073fe06d1cc8d4f82a4
[2022.11.24-16.46.06:794][ 49]LogXmpp:VeryVerbose: libstrophe[35578] tls debug: Certificate verification FAILED, result=X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN(19)
[2022.11.24-16.46.06:794][ 49]LogXmpp:VeryVerbose: libstrophe[35578] tls debug: Certificate was not presented by peer
[2022.11.24-16.46.06:794][ 49]LogXmpp:VeryVerbose: libstrophe[35578] tls debug: error=SSL_ERROR_SSL(1) errno=0 lasterror=0
[2022.11.24-16.46.06:794][ 49]LogXmpp:VeryVerbose: libstrophe[35578] tls debug: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
[2022.11.24-16.46.06:794][ 49]LogXmpp:VeryVerbose: libstrophe[35578] conn debug: Couldn't start TLS! error -3 tls_error 1
[2022.11.24-16.46.06:798][ 50]LogXmpp:VeryVerbose: libstrophe[35578] conn debug: SENT: </stream:stream>
[2022.11.24-16.46.06:798][ 50]LogXmpp:VeryVerbose: libstrophe[35578] xmpp debug: Send error occurred, disconnecting.
[2022.11.24-16.46.06:798][ 50]LogXmpp:VeryVerbose: libstrophe[35578] xmpp debug: Closing socket.
[2022.11.24-16.46.06:798][ 50]LogXmpp: Strophe XMPP thread received state change Was: ProcessingLogin Now: LoggedOut
[2022.11.24-16.46.06:798][ 50]LogXmpp: Strophe processing LoginStatus change Was: ProcessingLogin Now: LoggedOut
[2022.11.24-16.46.06:798][ 50]LogXmpp: Logged OUT JID=0b0f09b400854b9b98932dd9e5abe7c5@prod.ol.epicgames.com/V2:UnrealTournamentDev:::049629ED060B1118002E014624320BAA
timiimit commented 1 year ago

after further investigation i found out that verification works just fine, its just that the search location is incorrect. for some reason OpenSSL checks //certs (maps to /certs) directory. i'm not sure how to handle this. i will need to google a bit to figure out optimal paths for generic distros. openssl version -d seems to return used directory and on my archlinux it uses /etc/ssl.

timiimit commented 1 year ago

For now i think ill just hard-code the /etc/ssl location. it seems that most distros use either this or /etc/ca-certificates. there is update-ca-trust command (hopefully on all distros) which can help configure /etc/ssl if it does not exist.

Another issue was not being able to open up the friends list. I managed to enable it after looking a bit into linux's calling convention (System V AMD64 ABI), which is more convenient than windows x64 calling convention in some cases.

While hovering over the button that opens friendlist, tooltip still says that current platform is not supported. Since that is part of the menu i will leave it as it is. This will be fixed later when menus get reimplemented.