Solved

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

Posted on 2014-01-10
2
491 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 63

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article outlines the process to identify and resolve account lockout in an Active Directory environment.
Many businesses neglect disaster recovery and treat it as an after-thought. I can tell you first hand that data will be lost, hard drives die, servers will be hacked, and careless (or malicious) employees can ruin your data.
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

830 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