It's good that you found the makecert command, but maybe if you also checked the makecert documentation , you found where the certificate is stored, because it is defined in the parameters of your command:
- sr says certificate will be created for
LocalMachine store location - ss says the certificate is stored in the
Personal ( My ) store
The certificate is stored in the certificate store, so use MMC.exe to find it:
- Open Start Menu
- In search / launch mode mmc and run it
- From the File menu, select Add / Remove Snap-In
- Select the Certificates snap-in with the local computer area and confirm.
Now in the Personal store for your LocalMachine certificate, select MyServerCert and select "All Tasks> Export" in the context menu. During the export, verify that you want to export the private key, but do not check the advanced security or private key deletion. You will also need to choose the path where the exported certificate will be stored, and the password for accessing the private key.
From the VS command line, you can also run this command, which will also export for you:
certutil.exe -privatekey -p password -exportpfx "MyServerCert" C:\Temp\MyServerCert.pfx
It must export the private key certificate to the Temp directory and password for the password certificate.
Ladislav Mrnka
source share