Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I generated csr_code and csr_key using csr api call but now i want to generate certificate using csr_code. i was try many way but i didn't get success to generate certificate.

What I have tried:

var pfxBuilder = cert.ToPfx(privateKey);
pfxBuilder.AddIssuer(System.IO.File.ReadAllBytes("../Data/test-
root.pem"));
var pfx = pfxBuilder.Build("my-cert", "abcd1234");
System.IO.File.WriteAllBytes("./my-cert.pfx", pfx);
Posted
Updated 21-Oct-19 21:55pm

1 solution

See this CodeProject article: Creating Self-signed Certificates[^]
This is batch file oriented, but you can call these using: Process.Start Method (System.Diagnostics) | Microsoft Docs[^]

Here is a programmatic way: X.509 certificates - Rebex.NET[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900