Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run makecert.exe without a GUI?

I recently came across a problem generating self-signed certificates in an automated fashion. Anytime I run makecert.exe I get a pop-up window for a password for the certificate. However, these certificates will never be distributed, so I don't need a password or anything.

How can I get makecert.exe to work without requiring a GUI?

If it helps, my command line takes this kind of form:

makecert.exe mycert.cer -r -n "CN=random-hex-number" -$ individual -sv private.pkv -pe -cy end

like image 783
Earlz Avatar asked Oct 23 '12 20:10

Earlz


People also ask

What is Makecert EXE?

MakeCert (Makecert.exe) is a command-line CryptoAPI tool that creates an X. 509 certificate that is signed by a system test root key or by another specified key. The certificate binds a certificate name to the public part of the key pair. The certificate is saved to a file, a system certificate store, or both.

Where is Makecert EXE?

The tool is installed in the \Bin folder of the Microsoft Windows Software Development Kit (SDK) installation path.


1 Answers

I didn't solve the root problem, but found a way to work around it. It only prompts for a password when you don't provide a private key. By generating a private key beforehand and passing it as the PVK, it won't prompt for a password now.

like image 144
Earlz Avatar answered Jan 05 '23 00:01

Earlz