0 votes
by (220 points)

Hi,

I am not able to establish the WebSocket connection after I update the expired certificates, and the same certificates work fine with the other local server.
Need help in figuring out the issue here.

Thanks in advance!!

Here are the logs:

2024-02-12 15:35:26.645 VERBOSE WebSocketClient(3)[6] TLS: Sent TLS packet: 
 0000 |16-03-03-00-25-10-00-00 21-20-68-2B-AE-6C-9F-04| ....%...! h+.l..
 0010 |14-9D-DF-5D-09-57-B2-55 26-08-A4-95-78-EA-E9-E2| ...].W.U&...x...
 0020 |BE-C3-2D-AF-4B-27-E7-EF E8-55                  | ..-.K'...U
2024-02-12 15:35:26.645 DEBUG WebSocketClient(3)[6] TLS: HandshakeMessage:ClientKeyExchange was sent.
2024-02-12 15:35:26.646 INFO WebSocketClient(3)[6] TLS: Performing client certificate authentication.
2024-02-12 15:35:26.646 VERBOSE WebSocketClient(3)[6] TLS: Sent TLS packet: 
 0000 |16-03-03-00-48-0F-00-00 44-08-07-00-40-B2-EC-E6| ....H...D...@...
 0010 |12-2A-AE-80-CA-B7-08-53 0C-1A-2B-90-51-79-DD-5C| .*.....S..+.Qy.\
 0020 |7B-2C-E6-61-91-25-20-54 25-FB-65-BD-65-09-B3-1B| {,.a.% T%.e.e...
 0030 |24-27-EB-EC-42-A0-F1-20 41-EC-BF-CE-C6-5C-CF-5F| $'..B.. A....\._
 0040 |AE-DB-98-E3-CB-79-B8-5E 4A-C9-98-5A-02         | .....y.^J..Z.
2024-02-12 15:35:26.646 DEBUG WebSocketClient(3)[6] TLS: HandshakeMessage:CertificateVerify was sent.
2024-02-12 15:35:26.646 VERBOSE WebSocketClient(3)[6] TLS: Sent TLS packet: 
 0000 |14-03-03-00-01-01                              | ......
2024-02-12 15:35:26.646 DEBUG WebSocketClient(3)[6] TLS: CipherSpec:ChangeCipherSpec was sent.
2024-02-12 15:35:26.646 DEBUG WebSocketClient(3)[6] TLS: HandshakeMessage:Finished was sent.
2024-02-12 15:35:26.646 VERBOSE WebSocketClient(3)[6] TLS: Sent TLS packet: 
 0000 |16-03-03-00-10-14-00-00 0C-6A-F9-97-9B-BF-F6-B1| .........j......
 0010 |BA-32-9A-9A-48                                 | .2..H
2024-02-12 15:35:26.660 DEBUG WebSocketClient(3)[6] TLS: TLS socket was closed abruptly.
2024-02-12 15:35:26.660 DEBUG WebSocketClient(3)[6] TLS: Rebex.Net.TlsException: Connection was closed by the remote connection end.
  at lnmjb.alreg.elpcg (System.Int32 p0) [0x00180] in <40c4a6a01a3940b784746d1219b1ce98>:0 
  at lnmjb.alreg.gfsfg () [0x00000] in <40c4a6a01a3940b784746d1219b1ce98>:0 
  at lnmjb.alreg.cklwv () [0x00063] in <40c4a6a01a3940b784746d1219b1ce98>:0 
2024-02-12 15:35:26.661 ERROR WebSocketClient(3)[6] HTTP: Error while sending request: Rebex.Net.TlsException: Connection was closed by the remote connection end. ---> Rebex.Net.TlsException: Connection was closed by the remote connection end.
  at lnmjb.alreg.elpcg (System.Int32 p0) [0x00180] in <40c4a6a01a3940b784746d1219b1ce98>:0 
  at lnmjb.alreg.gfsfg () [0x00000] in <40c4a6a01a3940b784746d1219b1ce98>:0 
  at lnmjb.alreg.cklwv () [0x00063] in <40c4a6a01a3940b784746d1219b1ce98>:0 
   --- End of inner exception stack trace ---
  at lnmjb.alreg.cklwv () [0x00163] in <40c4a6a01a3940b784746d1219b1ce98>:0 
  at lnmjb.alreg.wmawv () [0x00071] in <40c4a6a01a3940b784746d1219b1ce98>:0 
  at lnmjb.lcaez.coish () [0x00056] in <40c4a6a01a3940b784746d1219b1ce98>:0 
  at lnmjb.lcaez.flcsv () [0x00000] in <40c4a6a01a3940b784746d1219b1ce98>:0 
  at Rebex.Net.TlsSocket.klckc () [0x00006] in <40c4a6a01a3940b784746d1219b1ce98>:0 
  at Rebex.Net.TlsSocket.Negotiate () [0x00014] in <40c4a6a01a3940b784746d1219b1ce98>:0 
  at lnmjb.jkuzm.gsfme (Rebex.Net.ISocket p0, Rebex.Net.TlsCipher& p1) [0x00032] in <40c4a6a01a3940b784746d1219b1ce98>:0 
  at lnmjb.jkuzm.qmmrb () [0x00039] in <40c4a6a01a3940b784746d1219b1ce98>:0 
  at lnmjb.ndnfv.ejzat () [0x000c9] in <40c4a6a01a3940b784746d1219b1ce98>:0 
  at lnmjb.ndnfv.fiqwb (System.Boolean p0) [0x000f5] in <40c4a6a01a3940b784746d1219b1ce98>:0 
  at lnmjb.ndnfv.oqidt () [0x001b9] in <40c4a6a01a3940b784746d1219b1ce98>:0 
2024-02-12 15:35:26.663 ERROR WebSocketClient(3)[6] WebSocket: Error occurred: Rebex.Net.WebSocketException: Connection was closed by the remote connection end. ---> lnmjb.fsvcp: Connection was closed by the remote connection end. ---> Rebex.Net.TlsException: Connection was closed by the remote connection end. ---> Rebex.Net.TlsException: Connection was closed by the remote connection end.
  at lnmjb.alreg.elpcg (System.Int32 p0) [0x00180] in <40c4a6a01a3940b784746d1219b1ce98>:0 
  at lnmjb.alreg.gfsfg () [0x00000] in <40c4a6a01a3940b784746d1219b1ce98>:0 
  at lnmjb.alreg.cklwv () [0x00063] in <40c4a6a01a3940b784746d1219b1ce98>:0 
   --- End of inner exception stack trace ---
  at lnmjb.alreg.cklwv () [0x00163] in <40c4a6a01a3940b784746d1219b1ce98>:0 
  at lnmjb.alreg.wmawv () [0x00071] in <40c4a6a01a3940b784746d1219b1ce98>:0 
  at lnmjb.lcaez.coish () [0x00056] in <40c4a6a01a3940b784746d1219b1ce98>:0 
  at lnmjb.lcaez.flcsv () [0x00000] in <40c4a6a01a3940b784746d1219b1ce98>:0 
  at Rebex.Net.TlsSocket.klckc () [0x00006] in <40c4a6a01a3940b784746d1219b1ce98>:0 
  at Rebex.Net.TlsSocket.Negotiate () [0x00014] in <40c4a6a01a3940b784746d1219b1ce98>:0 
  at lnmjb.jkuzm.gsfme (Rebex.Net.ISocket p0, Rebex.Net.TlsCipher& p1) [0x00032] in <40c4a6a01a3940b784746d1219b1ce98>:0 
  at lnmjb.jkuzm.qmmrb () [0x00039] in <40c4a6a01a3940b784746d1219b1ce98>:0 
  at lnmjb.ndnfv.ejzat () [0x000c9] in <40c4a6a01a3940b784746d1219b1ce98>:0 
  at lnmjb.ndnfv.fiqwb (System.Boolean p0) [0x000f5] in <40c4a6a01a3940b784746d1219b1ce98>:0 
  at lnmjb.ndnfv.oqidt () [0x001b9] in <40c4a6a01a3940b784746d1219b1ce98>:0 
   --- End of inner exception stack trace ---
  at lnmjb.ndnfv.oqidt () [0x00485] in <40c4a6a01a3940b784746d1219b1ce98>:0 
  at lnmjb.iyiln+uipkf.lfmpa () [0x00000] in <cd0e423737294af790dac3bd0adc9b2c>:0 
  at System.Threading.Tasks.Task`1[TResult].InnerInvoke () [0x0000f] in <a397f8ddf5cc4340b1b7367e6ca02e39>:0 
  at System.Threading.Tasks.Task.Execute () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:2319 
--- End of stack trace from previous location where exception was thrown ---

  at lnmjb.iyiln.elnxv (System.Uri p0, lnmjb.ibabe p1, Rebex.Net.ISocketFactory p2, Rebex.Net.WebSocketClientSettings p3, Rebex.Net.WebSocketClientOptions p4, System.Action`1[T] p5, Rebex.Net.TlsParameters p6, System.Threading.CancellationToken p7) [0x003b6] in <cd0e423737294af790dac3bd0adc9b2c>:0 
   --- End of inner exception stack trace ---
  at lnmjb.iyiln.elnxv (System.Uri p0, lnmjb.ibabe p1, Rebex.Net.ISocketFactory p2, Rebex.Net.WebSocketClientSettings p3, Rebex.Net.WebSocketClientOptions p4, System.Action`1[T] p5, Rebex.Net.TlsParameters p6, System.Threading.CancellationToken p7) [0x003de] in <cd0e423737294af790dac3bd0adc9b2c>:0 
  at Rebex.Net.WebSocketClient.ConnectAsync (System.Uri uri, System.Threading.CancellationToken cancellationToken) [0x00211] in <cd0e423737294af790dac3bd0adc9b2c>:0 
Applies to: Rebex WebSocket

1 Answer

0 votes
by (147k points)
The log indicates you are trying to authenticate using a certificate with Ed25519 key. Are you sure the server actually supports this key algorithm? As far as we know, support for Ed25519 certificates is still quite rare at the moment. It might be useful to try authenticating using a certificate with RSA or ECDSA key - these are widely supported.
by (220 points)
Hi Lukas,
Thanks for the response.
Yes, our server supports the Ed25519 algorithm. It was working perfectly before, I only updated Certificates b'coz older ones were expired. And the same set of new certificates are working with the local server.
And when I use another Algorithm(other than Ed25519), I receive "Fatal error 'HandshakeFailure' has been reported by the remote connection end."
by (147k points)
In that case, I would assume that the server was not configured to accept that particular certificate. But regardless, it was the server who closed the connection upon receiving the client certificate and the relevant signature, so the server-side log would hopefully contain information about the actual reason for this. From the client side, it just appears to be a sudden connection closure.
...