Modify public key only in the key container
From: Phoebe (Phoebe_at_discussions.microsoft.com)
Date: 02/28/05
- Next message: William Dicks: "Smart Card Base Components problem on XP"
- Previous message: Adam Augustyn: "Re: Debugging CSP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 28 Feb 2005 03:55:04 -0800
I am writing a custom CSP. My private key is stored in another computer. I
have the public key. I want to modify the public key persistently in a key
container to be my public key, I don't care about the private key as I don't
use it. Here is what I did:
1. create a key pair in a key container using CPGenKey. Set the flag
CRYPT_EXPORTABLE
2. export PRIVATEKEYBLOB using CPExportKey
3. modify the public key modulus/exponent to be my public key 's
modulus/exponent.
4. Import the PRIVATEKEYBLOB back into my key conainter. I got the error msg
80090005(BAD DATA)
Can someone help me that? or Is it possible to do it?
Thank you
Phoebe
- Next message: William Dicks: "Smart Card Base Components problem on XP"
- Previous message: Adam Augustyn: "Re: Debugging CSP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|