Convert Certificate and Private Key to .PFX programmatically in C#
问题 I have a .cer file output from a successful LetsEncrypt certificate request. I have the original Private Key used to create the Certificate Signing Request (CSR) for LetsEncrypt. Now we need to programmatically combine these two files into a PFX bundle for IIS using .NET Since we are trying to to do this programmatically pvk2pfx is not practical, and we would like to avoid openssl if possible. To demonstrate though, we are trying to replicate this function but using CS .NET instead of pvk2pfx