-1

If I add a certificate to http client like this. And I have a web application set up with a owin middleware. How can I get this certificate from request and check on it?

            var handler = new HttpClientHandler(); 

            var bytes = File.ReadAllBytes(certPath); 

            var cert = new X509Certificate2(bytes); 

 

            handler.ClientCertificates.Add(cert); 

            var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, apiUrl); 

            var httpClient = new HttpClient(handler); 
KKKK
  • 11
  • 3

0 Answers0