Search Unity

HttpWebRequest with client certificate fails with timeout

Discussion in 'Multiplayer' started by mpfeifer, Jan 14, 2020.

  1. mpfeifer

    mpfeifer

    Joined:
    Feb 8, 2017
    Posts:
    2
    Hello at all,
    My Unity app uses a HttpWebRequest with a client certificate (for authentication) to call a API behind a TMG proxy server. The app is working with this server but we need to replace the TMG with a Microsoft WAP server, which is used for the same purpose (Authentication). The certificates are identical on both servers. I use the same Unity code.

    The Unity application is successfully connecting against the TMG proxy, but against the WAP server, I get a connection timeout without any other exception or error response. Using a Browser or a native Windows Application (WPF, using the same C# code) will connect successfully with the WAP server.

    Investigating the network traffic against the WAP server shows, that the client (Tested Unity 2018.4.14 and Unity 2019.2.17 Windows standalone) receives a "Server Helo" including the certificate of the server and then just stops after two handshakes.
    Unity_handshake.png
    Using a Windows WPF app against the WAP server looks like this:
    Windows_native_handshake.png

    The WAP server supports SNI, whereas the TMG does not. So we disabled SNI on the WAP server but still the same timeout.
    The Unity client application is required for Windows and iOS.

    Is this a Unity bug or is it a server configuration issue?
    Any hints are warmly welcome.
     
  2. mpfeifer

    mpfeifer

    Joined:
    Feb 8, 2017
    Posts:
    2
    Has anyone successfully used the MSAL library in Unity for iOS, Windows standalone or UWP? Is there an alternative way for iOS to use .Net instead of creating a unity plugin with the native obj version?