Solved

makecert crashing 2nd time I try it.  I'm not removing something it creates.

Posted on 2014-01-10
2
488 Views
Last Modified: 2014-01-12
Hi Experts,

I'm doing the following command on Visual Studio 2008 command line:
makecert.exe -sr currentuser -ss ROOT -a sha1 -n "CN=MyCompany,O=MyCompany,OU=MyUnit" -sky signature -pe -r "MyCompanyCA.cer" -sv "MyCompanyCA.pvk"

This works fine the first time.  But if I go into MMC and remove the certificate it generates and delete the generated files in the current directory (the cert and the pvk) and try the same command again, it crashes.  There's something else I need to delete somewhere - would anyone know what that something else is?

I know it's this because if I change the name of MyCompany to MyCompany2 (throughout), it works...

Thank you!
Mike
0
Comment
Question by:thready
2 Comments
 
LVL 61

Accepted Solution

by:
btan earned 500 total points
ID: 39773090
Pls see this which drill  Into registry for cleanup. Also it stated a gotcha It doesn’t mention one gotcha discovered by trial and error:  without specifying an -sk option, it created the key using some default key container, and attempting to export key parameters in .NET code (using ExportParameters() or ExportCspBlob()) throws an exception–apparently the key container will not allow it. Maybe os through registry easier to find the certificate in the stores deposited

http://banachowski.com/deprogramming/2011/01/deleting-unwanted-certificate-stores-from-windows/

The detailed option for makecert can be found

http://msdn.microsoft.com/en-us/library/windows/desktop/aa386968(v=vs.85).aspx
0
 
LVL 1

Author Closing Comment

by:thready
ID: 39775045
Thank you!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Article by: btan
Provide an easy one stop to quickly get the relevant information on common asked question on Ransomware in Expert Exchange.
If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now