Generate X.509 Certificate from Base64 string in Nodejs

Viewed 1855

Suppose I have a Base64 certificate string and.

I know how to generate a x509 certificate in C# code,

string base64CertificateString = "MIIxxxxxxxx....xxxx";
string password = "xxxxxxxx";
byte[] bytes = Convert.FromBase64String(base64CertificateString);
X509Certificate2 x509certificate = new X509Certificate2(bytes, password, X509KeyStorageFlags.DefaultKeySet);

How can I do the same thing in Nodejs?

0 Answers
Related