RE: How to determin a cert in personal store does have private key
From: cyberninja (cyberninja_at_discussions.microsoft.com)
Date: 09/27/04
- Previous message: cyberninja: "RE: How to determin a cert in personal store does have private key?"
- In reply to: cyberninja: "RE: How to determin a cert in personal store does have private key?"
- Next in thread: lelteto: "RE: How to determin a cert in personal store does have private key"
- Reply: lelteto: "RE: How to determin a cert in personal store does have private key"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 27 Sep 2004 14:29:03 -0700
I think after fetching CERT_KEY_PROV_INFO_PROP_ID from a cert in "My" store,
if we can get the current key container via
CertGetCertificateContextProperty(), we can determine whether the cert has a
private key.
Is that right?
Thanks
"cyberninja" wrote:
> From MSDN "
> CERT_KEY_PROV_HANDLE_PROP_ID, CERT_KEY_PROV_INFO_PROP_ID, and
> CERT_KEY_CONTEXT_PROP_ID
> These properties tie a certificate to a particular CSP and, within that CSP,
> to a particular private key."
>
> However, I don't know if I can use the existance of 0-3 of the above prop
> ids to determine if a private key is available. In my basic test, it seems
> that CERT_KEY_PROV_INFO_PROP_ID is requried for a cert with provate key. Is
> that right?
>
> "cyberninja" wrote:
>
> > How to determin a cert in personal store does have private key? I know I an
> > use CryptAcquireCertificatePrivateKey(), but is there an alternative way to
> > do this? (just check if the private key exists)
> >
> > Thanks
- Previous message: cyberninja: "RE: How to determin a cert in personal store does have private key?"
- In reply to: cyberninja: "RE: How to determin a cert in personal store does have private key?"
- Next in thread: lelteto: "RE: How to determin a cert in personal store does have private key"
- Reply: lelteto: "RE: How to determin a cert in personal store does have private key"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|