0 Replies
      Latest reply on Nov 13, 2019 5:15 AM by cyrpro@universalremote.com
      cyrpro@universalremote.com Level 1 Level 1 (0 points)

        Hi,

        We were trying to setup communication with the apple MFi server staging enviorement from .NET core WebAPI.

        Have followed the steps as per the documentation which state that the license server should be trusted (DigiCert certificate used for the same) and that the client certificate must be provided to apple in order to establish a secure tunnel.

        The client certificates (.pem files) we are trying with were generated a few months back but are still valid. The .pem doesn't seem to authorize a machine but rather a company account, correct me if I'm wrong here. (So it should work if the csr for the pem files was not generated from the licensee server?)

         

        Tried through Postman as well as .NET

        var handler = new HttpClientHandler(); 
        handler.ClientCertificateOptions = ClientCertificateOption.Manual; 
        handler.SslProtocols = SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12; 
        handler.ClientCertificates.Add(new X509Certificate("Certificate.pem"));  
        var httpClient = new HttpClient(handler)  
        
        // Tried with and without the user name 
        httpClient.DefaultRequestHeaders.TryAddWithoutValidation("User-Agent", "Company Name/Client Name/Client Version");  
        var result = httpClient.GetAsync(StagingURL).Result; 

        the issue we are facing is we are always getting 401, Unauthorized Access error from the Apple Server. Wanted to know what the cause might be.

        Thanks in advance!