all groups > dotnet security > august 2004 >
You're in the

dotnet security

group:

Get Certificate


Re: Get Certificate Michel Gallant
8/31/2004 1:53:15 PM
dotnet security:
..NET 1.1 does not provide very good support for using CryptoAPI
certificate stores. Next release is much better. See api at:
http://longhorn.msdn.microsoft.com/

You can support cert stores for .NET 1.1 using either COM interop
(with CAPICOM) or via Pinvoke to capi directly:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncapi/html/netcryptoapi.asp

- Mitch Gallant
MVP Security

[quoted text, click to view]

Get Certificate news.microsof.com
8/31/2004 7:18:09 PM
How do I get the Certificates stored on my computer ??

I want to use RSACryptoServiceProvider, and my certificates are hashed with
SHA1

I think that I just use:
System.Security.Cryptography

and under that uses the RSACryptoServiceProvider, but I can't find out how
to get the certificate on my local machine using this.

can anybody help me ?

Best Regards

Kim

Re: Get Certificate Kim Madsen
9/1/2004 1:48:30 PM
Thanks you your quick reply !

I used this CAPICOM in my .NET code and it worked, I god my data signed at
send af signed mail :o) Great !!

But there is a problem :o(

When I sign my data for the mail:

szSignature = oSignedData.Sign(oSigner, True, CAPICOM_ENCODE_BINARY)

the thirt party (TDC, CA in denmark) comes up with a prompt box to type in

password for the certificate (The password for the private key).

That is a problem because my code has to be running on a server.

TDC says that I have to use: CryptSetKeyParam(hash,Password,)

Calling this CryptSetKeyParam should give TDC the password so they are not
prompting for it.

Then I can sign my data without it prompt me for a password.

Do you have any ideer how to solve this problem ? Can I call this
CryptSetKeyParam from

CAPICOM or what do you think i shoul do ?

Thanks for your help so far :o)

Best Regards

Kim

"Michel Gallant" <neutron@istar.ca> skrev i en meddelelse
news:OO3EwN4jEHA.2652@TK2MSFTNGP15.phx.gbl...
[quoted text, click to view]

AddThis Social Bookmark Button