Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug TLS Handshaked Failed UNITYTLS_INTERNAL_ERROR, verify result: 4294936064

Discussion in 'Experimental Scripting Previews' started by ZhouHyan, Mar 14, 2022.

  1. ZhouHyan

    ZhouHyan

    Joined:
    Sep 5, 2017
    Posts:
    4
    I have the same problem,I have a need by using mqtt with ssl(TLS1.2) to connect with broker.I made it success with a .net app project,but it failed on Unity Editor(2020.3.26f) with same code.
    Code (CSharp):
    1. [code=CSharp]MQTTnet.Exceptions.MqttCommunicationException: A call to SSPI failed, see inner exception. ---> System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception. ---> Mono.Security.Interface.TlsException: Handshake failed - error code: UNITYTLS_INTERNAL_ERROR, verify result: 4294936064
    2.   at Mono.Unity.Debug.CheckAndThrow (Mono.Unity.UnityTls+unitytls_errorstate errorState, Mono.Unity.UnityTls+unitytls_x509verify_result verifyResult, System.String context, Mono.Security.Interface.AlertDescription defaultAlert) [0x00036] in <0463b2ef957545c0a51b42f372cd4fbb>:0
    3.   at Mono.Unity.UnityTlsContext.ProcessHandshake () [0x00082] in <0463b2ef957545c0a51b42f372cd4fbb>:0
    4.   at Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake (Mono.Net.Security.AsyncOperationStatus status) [0x0003e] in <0463b2ef957545c0a51b42f372cd4fbb>:0
    5.   at (wrapper remoting-invoke-with-check) Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake(Mono.Net.Security.AsyncOperationStatus)
    6.   at Mono.Net.Security.AsyncHandshakeRequest.Run (Mono.Net.Security.AsyncOperationStatus status) [0x00006] in <0463b2ef957545c0a51b42f372cd4fbb>:0
    7.   at Mono.Net.Security.AsyncProtocolRequest+<ProcessOperation>d__24.MoveNext () [0x000ff] in <0463b2ef957545c0a51b42f372cd4fbb>:0
     
  2. jerome_unity855

    jerome_unity855

    Joined:
    Sep 15, 2022
    Posts:
    1
    Hello @ZhouHyan did you find a solution ?
    I'm facing the same issue.
    Thanks
     
  3. osdima1

    osdima1

    Joined:
    Nov 4, 2019
    Posts:
    12
    same here
     
  4. ZhouHyan

    ZhouHyan

    Joined:
    Sep 5, 2017
    Posts:
    4
    I solved this by upgrade Unity with 2021.3.11.I think they Upgrade Mono version
     
  5. vaki26

    vaki26

    Joined:
    Jan 23, 2015
    Posts:
    22
    Where are the Certs and how do I get one ?

    Unity worked fine until new computer now I get:

    TlsException: Handshake failed - error code: UNITYTLS_INTERNAL_ERROR, verify result: UNITYTLS_X509VERIFY_NOT_DONE
    Mono.Unity.Debug.CheckAndThrow (Mono.Unity.UnityTls+unitytls_errorstate errorState, Mono.Unity.UnityTls+unitytls_x509verify_result verifyResult, System.String context, Mono.Security.Interface.AlertDescription defaultAlert) (at <14e3453b740b4bd690e8d4e5a013a715>:0)
    Mono.Unity.UnityTlsContext.ProcessHandshake () (at <14e3453b740b4bd690e8d4e5a013a715>:0)
    Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake (Mono.Net.Security.AsyncOperationStatus status) (at <14e3453b740b4bd690e8d4e5a013a715>:0)
    (wrapper remoting-invoke-with-check) Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake(Mono.Net.Security.AsyncOperationStatus)
    Mono.Net.Security.AsyncHandshakeRequest.Run (Mono.Net.Security.AsyncOperationStatus status) (at <14e3453b740b4bd690e8d4e5a013a715>:0)
    Mono.Net.Security.AsyncProtocolRequest+<ProcessOperation>d__24.MoveNext () (at <14e3453b740b4bd690e8d4e5a013a715>:0)
    --- End of stack trace from previous location where exception was thrown ---
    System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <fb001e01371b4adca20013e0ac763896>:0)
    System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at <fb001e01371b4adca20013e0ac763896>:0)
    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at <fb001e01371b4adca20013e0ac763896>:0)
    System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at <fb001e01371b4adca20013e0ac763896>:0)
    System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () (at <fb001e01371b4adca20013e0ac763896>:0)
    Mono.Net.Security.AsyncProtocolRequest+<StartOperation>d__23.MoveNext () (at <14e3453b740b4bd690e8d4e5a013a715>:0)
    Rethrow as AuthenticationException: A call to SSPI failed, see inner exception.
    System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <fb001e01371b4adca20013e0ac763896>:0)
    Mono.Net.Security.MobileAuthenticatedStream+<ProcessAuthentication>d__47.MoveNext () (at <14e3453b740b4bd690e8d4e5a013a715>:0)
    Rethrow as AggregateException: One or more errors occurred.
    Desktop.Start () (at Assets/Core/Scripts/Core/Desktop.cs:73)