1

I have just started learing to create certificates. I have created some & located in store using MMC. But, when I tried this command , I was unable to locate certificate.

makecert -n "CN=My Awesome Certificate Authority" -a sha1 -sv "MyCAuth PrivateKey.pvk" -r "My Awesome Certificate Authority.cer"

But , when I specify the store name , I was able to locate the cetificate. Can someone explain. What is wrong with above command or what is the default value for -ss switch.

makecert -n "CN=Test2" -a sha1 -sv "MyCAuth PrivateKey.pvk" -r "My Awesome Certificate Authority.cer" -ss root

2 Answers 2

1

In this condition, (or without -ss switch) , certificate will be stored to a file in windows .

File will be located the your working directory you run the tool from. If you run a cmd instance as admin, that ends up in %SystemRoot%\system32 (or %SystemRoot%\SysWOW64), but this is not a constant. for, a non-admin instance defaults to %UserProfile%,

To install the certificate in store , we can just right click on .cer file to install , this will prompt you select the store location(CurrentUser/LocalMachine) and certificate store. Now, you can verify the same using MMC console.

Thanks.

2
  • This is inaccurate: the file is located in the working directory you ran the tool from. If you run a cmd instance as admin, that ends up in %SystemRoot%\system32 (or %SystemRoot%\SysWOW64), but this is not a constant. In fact, a non-admin instance defaults to %UserProfile%, but you can cd anywhere and the files will be dumped there. If you cd C:\MyFavouriteFolder and then makecert from there, your certificate and key will be located in C:\MyFavouriteFolder.
    – Bob
    Jul 8, 2016 at 4:25
  • Great, I can upvote now :)
    – Bob
    Jul 8, 2016 at 5:33
0

Make sure to check all certificate stores, for both local machine and your user.

From relevant question, How can I start certmgr.msc for computer account?:

1) Start → Run: mmc.exe
2) Menu: File → Add/Remove Snap-in…
3) Under Available snap-ins, select Certificates and press Add.
4) Select Computer Account for the certificates to manage. Press Next.
5) Select Local Computer and press Finish.
6) Press OK to return to the management console.

1
  • I have already checked. No luck until I specify certificate store name explicitly using -ss. Jul 7, 2016 at 11:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .