Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't create a key of the Subject <'MyCAContainerName'>

using makecert i have written the commade:

makecert -pe -n "CN=Myauthority" -sr localmachine -ss Root -a sha256 -cy authority -r -sk MyCAContainerName -sky exchange -sp "Microsoft RSA Schannel Cryptographic Provider " -sy 12 -len 2048 certif.cer;

i recieved an error

Error: Can't create the key of the Subject <'MyCAContainerName'>

In seeking the solution, I discovered that the problem arises because I did not Authorizations on machineKey file : (C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys ), the

following link explains better what I'm saying;

http://support.microsoft.com/kb/278381

I followed the same procedures in order to have enough permissions to the a machine key, but the problem is always posed

like image 436
Mely Avatar asked Apr 20 '11 10:04

Mely


3 Answers

It seems that Can't create the key of the subject is a fairly generic error, however, what follows after it may give a clue.

While it may be caused by permissions errors (e.g. makecert.exe error: Can't create the key of the subject), I have also seen the error of the form Can't create the key of the subject ('<some guid>') caused by an incorrect parameter to the -sp argument.

In your case, Error: Can't create the key of the Subject <'MyCAContainerName'> would make me guess that there is something wrong with the -sk MyCAContainerName portion of the command, but the upshot is, if it is not something with permissions, than it is likely an incorrect command argument or combination of arguments.

like image 74
Nathan Avatar answered Oct 30 '22 23:10

Nathan


Master,

I Ran on the same error. I solved it running command prompt as an administrator user.

MV

like image 26
user5304010 Avatar answered Oct 30 '22 23:10

user5304010


Its late but I have the solution to this. First execute the command as you are, it will give the error Error: Can't create the key of the Subject <'MyCAContainerName'>. But it will create a .pvk file. Don't delete it. Instead execute the command again, but this time remove -sk MyCAContainerName from the command. And it will create your certificate.

like image 22
Aishwarya Shiva Avatar answered Oct 30 '22 23:10

Aishwarya Shiva