RE: How To Access Public Key Certificate
From: David Miller [MSFT] (dmiller_at_online.microsoft.com)
Date: 12/29/03
- Next message: Drew Cooper [MSFT]: "Re: Stored User Names and Passowrds"
- Previous message: Charles Godwin: "Stored User Names and Passowrds"
- In reply to: Richard Grossman: "How To Access Public Key Certificate"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 29 Dec 2003 10:56:05 -0800
Richard,
You may want to review the code example at http://msdn.microsoft.com/library/en-us/security/security/example_c_program_using_cryptencryptmessage_and_cryptdecryptmessage.asp for an example of encrypting a message using the public key of the recipient. As the comments suggest, it is likely you would want to extend the functionality of GetRecipientCert() to search for the specific recipient's certificate, but this may get you started.
Thanks,
David
This posting is provided "As Is" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
----- Richard Grossman wrote: -----
Hi,
I want to implement PKI in a program.
I use only default key container of windows I mean "My", "AdressBook" To
store certificate.
As I've understand (may be I wrong) "My" store certificate with private
key. Store AdressBook store public certificate (without private key).
I'm trying to encrypt (asymetric a short message) using the public key
of a certifcate stored. I've tried to use the function
CryptAcquireCertificatePrivateKey but It can't aquire context for
certificate without private key associated.
How can I aquire context or wich function I can call to get access to
the handle of public key certificate?
Thanks for help
Richard
- Next message: Drew Cooper [MSFT]: "Re: Stored User Names and Passowrds"
- Previous message: Charles Godwin: "Stored User Names and Passowrds"
- In reply to: Richard Grossman: "How To Access Public Key Certificate"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|