MAKECERT and ASP

O

Oleg Leikin

Hi all,
I've got two applications: the server (WinApp) and the ASP. Both of them must possess pub/priv keys and X509 certificates.
To generate certificate I use MAKECERT utility. Here is the problem that appears in the ASP case:

the following MAKECERT code creates an entry under "\Documents and Settings\All Users.W3KENT\Application Data\Microsoft\Crypto\RSA\MachineKeys":
-------------------------------------------------------------------------------------------------------------------------------------
makecert -pe -sk XXX -n "CN=Asp" -sr localmachine -sky exchange -$ commercial -cy both -e 01/12/2010 XXX.cer
-------------------------------------------------------------------------------------------------------------------------------------

The following code in ASP app creates ANOTHER entry at the same directory in spite of the SAME key type and the container name !!!
------------------------------------------------------------------------------------------------------------------------------------
CspParameters cp = new CspParameters();
cp.KeyContainerName = "XXX";
cp.KeyNumber = 1;
cp.Flags = CspProviderFlags.UseMachineKeyStore;
RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(cp);
------------------------------------------------------------------------------------------------------------------------------------

So, what else can cause new keys/container creation ? Are there some other parameters in RSA or MAKECERT that should be adjusted ?

Thnks in advance for any clue !

P.S. In WinApp the same procedure works fine, so I've tried also to impersonate an Administrator (I create the certificates in Administrator context), but without any success. But since I use the machine key store impersonation doesn't seem to be required.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top