Automate makecert password
Asked Answered
E

3

14

I am using the following command to generate a certificate:

makecert.exe" –sv cnName.pvk -n "cn=cnName" cnName.cer -r -eku 1.3.6.1.5.5.7.3.1
pvk2pfx -pvk cnName.pvk -spc cnName.cer -pfx cnName.pfx -po <password>

Both these commands pop up a password window to be entered. Is there a way to automate this, so there is no popup window?

Eponymy answered 13/10, 2015 at 23:56 Comment(0)
W
7

makecert.exe only prompts for a password when you don't provide a private key.
Create a private key and the popup won't be displayed.


To create a private key:

1 - Install OpenSSL if it is not installed already.

2 - openssl genrsa -out pvt.key 2048

Wilona answered 14/10, 2015 at 0:3 Comment(1)
Could you please provide any links on how to generate a private key?Eponymy
F
1

Instead of specifying "-sv" option, if we specify the "-sk" option there is no prompt for any password. Here as per the documentation from Microsoft, "sk" option looks for container where the private keys can be stored whereas "sv" looks for file and creates the file if not exist.

The command will change as follows

"makecert.exe" –sk "c:\{any location}" -n "cn=cnName" cnName.cer -r -eku 1.3.6.1.5.5.7.3.1

This information is collected as per the documentation given by Microsoft on "makecert" command from below link

https://learn.microsoft.com/en-us/windows-hardware/drivers/devtest/makecert

Flair answered 14/4, 2019 at 7:51 Comment(0)
C
0
  1. Get mssign32.dll in C:\Windows\SysWOW64 for 32bit or 64bit C:\Windows\system32 (only for Windows 64bit, Windows 32bit is here 32bit.
  2. Get mssign32.dll.mui in example address: C:\Program Files\WindowsApps\Microsoft.LanguageExperiencePacken-US_19041.3.3.0_neutral__8wekyb3d8bbwe\Windows\System32\en-US (19041.3.3.0 no must exist your system)
  3. Copy mssign32.dll, mssign32.dll.mui to dir with makecert.exe
  4. Example dir: makecert.exe, mssign32.dll, en-US\mssign32.dll.mui
  5. Download http://www.angusj.com/resourcehacker/ or use other editor for Resource in application. Now show screen.
  6. Automatic function no password!
Coycoyle answered 17/7, 2022 at 17:8 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Walkout

© 2022 - 2024 — McMap. All rights reserved.