how to GET https content using client certificate
Andrus
121
Reputation points
How to retrieve page over https using client and server certificate in .NET 6 C# ?
Using curl this works:
curl --no-progress-bar --silent --show-error -H "OrgId: 123456" --insecure --key private.key --cert server.crt https://example.com --output result.xml
How to convert this to C# ?
private.key file is text file in format
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAxTvKy3WRPqli9ODpIcTb8Bhnxa2x+8xip/kWq...
server.crt is text file in format
-----BEGIN CERTIFICATE-----
MIIEnzCCAoegAwIBAgIIIJKu2MhhxF0wDQYJKoZIhvcNAQENBQAwLjEeMBwGA1UE
This is ASP.NET 6 MVC application running in Debian and Windows servers.
Developer technologies | .NET | Entity Framework Core
780 questions
Developer technologies | ASP.NET | ASP.NET Core
4,824 questions
Developer technologies | ASP.NET | Other
3,600 questions
Sign in to answer