1

This is for C# server side using ASP.NET Web API. I need to send a Post request that has a certificate .pem file and a .key file. How do I attach them to my Post request?

  • To confirm, your web-service is making an outgoing HTTP request of its own? – Dai Jun 08 '21 at 15:40
  • 1
    Windows/.NET doesn't use the PEM format, it uses the PKCS12 format (aka `.pfx`) - there are plenty of tools for converting certificate formats. – Dai Jun 08 '21 at 15:41
  • 1
    After you've loaded your `.pfx` into an `X509Certificate2` instance, see here: https://stackoverflow.com/questions/40014047/add-client-certificate-to-net-core-httpclient – Dai Jun 08 '21 at 15:42

0 Answers0