sta / sta/websocket-sharp

An error has occurred during a TLS handshake.

Open
#185 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
6.1k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

WebSocketSharp.WebSocketException: An error has occurred during a TLS handshake.
---> System.IO.IOException: The authentication or decryption has failed.
---> Mono.Security.Protocol.Tls.TlsException: The authentication or decryption has failed.
  at Mono.Security.Protocol.Tls.RecordProtocol.ProcessAlert (AlertLevel alertLevel, AlertDescription alertDesc) [0x00000] in <filename unknown>:0
  at Mono.Security.Protocol.Tls.RecordProtocol.InternalReceiveRecordCallback (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0 \r\n  --- End of inner exception stack trace ---\r\n  at Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0 \r\n  --- End of inner exception stack trace ---\r\n  at WebSocketSharp.WebSocket.setClientStream () [0x00000] in <filename unknown>:0 \r\n  at WebSocketSharp.WebSocket.doHandshake () [0x00000] in <filename unknown>:0 \r\n  at WebSocketSharp.WebSocket.connect () [0x00000] in <filename unknown>:0
TlsHandshakeFailure

I am receiving this exception when connecting to a TLS server using the Unity platform. Connection works fine if I disable TLS or connect via another platform.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the TLS connection on Unity and a working platform, then trace the failure through WebSocket.setClientStream() and WebSocket.doHandshake() using the provided stack trace. Compare the platform-specific TLS behavior and document a reproducible cause and verified resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, unity
Domain
networking, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.