Re: importing private key globally to personal store

From: Doug Barlow (soft_pedal_at_hotmail.com)
Date: 12/22/04


Date: Wed, 22 Dec 2004 17:51:27 GMT

The Certificate Store doesn't store private keys, so you won't see them in
there.

Private keys are maintained by Cryptographic Service Providers (CSPs). If
your certificate has an associated private key, then the 'My' Certificate
Store will have pointers to the CSP where the private key is maintained.

Doug Barlow
The Soft Pedal Shop
CSP Design & Development Consulting
http://www.SoftPedal.net

-- 
"mangala" <msivaramakrishnan@inautix.com> wrote in message 
news:138601c4e827$e3911040$a501280a@phx.gbl...
> Hi,
>
> I am able to import certificates & keys to root store
> globally, but not to personal ("My") store.
>
> None of the API returns error, but the private key is not
> visible in the personal store through iexplore. Please
> help.
>
> The code goes like this:
>
> rootStore = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0,
> CERT_SYSTEM_STORE_LOCAL_MACHINE, L"MY");
> ...
> if (PFXIsPFXBlob(&blob))
> pfxStore = PFXImportCertStore( &blob, L"",
> CRYPT_MACHINE_KEYSET );
>
> while (0 != (pctx = CertEnumCertificatesInStore(pfxStore,
> pctx)))
> CertAddCertificateContextToStore(rootStore, pctx,
> CERT_STORE_ADD_REPLACE_EXISTING, 0));
>
> Thanks,
> Mangala 


Relevant Pages

  • Re: Alternative store vs. MY store
    ... store both the client cert and its associate private key on my USB memory ... your codes (CSP, ... indirect call to your CSP when one of your cert is involved in an operation. ...
    (microsoft.public.platformsdk.security)
  • Re: Alternative store vs. MY store
    ... >> keep the private key on the memory card all the time. ... > must so start to copy your certs to the store, ... > indirect call to your CSP when one of your cert is involved in an operation. ...
    (microsoft.public.platformsdk.security)
  • Re: PFXExportCertStoreEx
    ... which contains the actual PFX and write that to the disk. ... methods to export certificate + private key from the IE store. ...
    (microsoft.public.platformsdk.security)
  • Re: Unable to unwrap a symmetric key using the private key of an X
    ... the certificate (public and private key) is ... installed in the personal store of both local computer and current user and I ... The problem is related to the certificate store on the web service side. ... You installed the certificate in "OtherPeople" store but the policy points ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: smart card private key
    ... first storing the certificate information and the private key ... information in the system store. ... first of it the name of the CSP module that manages that key. ... information about the private key present on the smart card before ...
    (microsoft.public.platformsdk.security)