How to allow commas in makecert.exe when creating a certificate?

1

I try to use makecert.exe to create a certificate but it shows like this:

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin>makecert -ss TESTCOM -n CN="TESTCOM FOR Co.,Ltd." -sv E:\markcab\TEST.pvk -r
E:\markcab\TEST.cer Error:CryptCertStrToNameW failed => 0x80092023 (-2146885597) Failed

I know it caused by the comma contained in CN="TEST Co.,Ltd" , but I must to use the comma in this command, how could I do?

certificate
x509certificate
makecert
asked on Stack Overflow Oct 31, 2016 by Zoe.D • edited Oct 31, 2016 by halfer

1 Answer

2

To include a coma, you have to enclose your CN with quote and add '\' before and after the CN value

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin>makecert -ss TESTCOM -n "CN=\"TESTCOM FOR Co.,Ltd.\"" -sv E:\markcab\TEST.pvk -r
answered on Stack Overflow Oct 31, 2016 by Camille G.

User contributions licensed under CC BY-SA 3.0