Home All Groups Group Topic Archive Search About

SignedCms.ComputeSignature(CmsSigner) - Keyset does not exist

Author
17 Nov 2006 2:47 PM
kplkumar
I have searched quite a bit and could not find an answer to this error
I am getting.


ContentInfo contentInfo = new ContentInfo(msgBytes);

SignedCms signedCms = new SignedCms(contentInfo);

CmsSigner cmsSigner = new CmsSigner(Certificate); // pass X509
certificate

signedCms.ComputeSignature(cmsSigner); // throws error right here


The error is "Keyset does not exist".
Any idea why?

Author
17 Nov 2006 3:00 PM
Joe Kaplan
Is the private key for that certificate installed in your local crypto store
and does the current account have the necessary permissions on it?  You
can't sign something without the private key.

Joe K.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
Show quoteHide quote
"kplkumar" <kplku***@gmail.com> wrote in message
news:1163774836.183061.253400@h54g2000cwb.googlegroups.com...
>I have searched quite a bit and could not find an answer to this error
> I am getting.
>
>
> ContentInfo contentInfo = new ContentInfo(msgBytes);
>
> SignedCms signedCms = new SignedCms(contentInfo);
>
> CmsSigner cmsSigner = new CmsSigner(Certificate); // pass X509
> certificate
>
> signedCms.ComputeSignature(cmsSigner); // throws error right here
>
>
> The error is "Keyset does not exist".
> Any idea why?
>
Author
17 Nov 2006 3:53 PM
Dominick Baier
this is the typical error message when you don't have access to the priv
key - you can use this tool to set ACLs:

http://www.leastprivilege.com/HowToGetToThePrivateKeyFileFromACertificate.aspx

---
Dominick Baier, DevelopMentor
http://www.leastprivilege.com

Show quoteHide quote
> Is the private key for that certificate installed in your local crypto
> store and does the current account have the necessary permissions on
> it?  You can't sign something without the private key.
>
> Joe K.
>