0

I want to send JSON to an endpoint using vb or C# - easy enough to do. I also think I know how to attach the .CRT file to the request. However, I am unsure how to make use of the .pem private key file? Do I attach that to the request too? I'm using.net framework 4.

Dr T
  • 504
  • 1
  • 7
  • 20
  • The private key is used to sign the encrypted data You should not give it to anybody! https://www.pkisolutions.com/accessing-and-using-certificate-private-keys-in-net-framework-net-core/ – Chris Berlin Jun 03 '21 at 11:12
  • Thanks. Any hints/tips on how to do that? Am I signing the data I am sending out? – Dr T Jun 03 '21 at 16:00

1 Answers1

0

Solution: You need to create a .pfx file:

openssl pkcs12 -in a.crt -inkey a.pem -export -out a.pfx

and then add that to your request as shown here.

Dr T
  • 504
  • 1
  • 7
  • 20