Zip Component, Email Component, Encryption Component ActiveX Control for Zip Compression .NET Components for ASP.NET
ActiveX and .NET Components for Zip Compression, Encryption, Email, XML, S/MIME, HTML Email, Character Encoding, Digital Certificates, FTP, and more ASP Email ActiveX Component


Index of Chilkat Blog Posts

November 9, 2005

Using Custom Registry Certificate Store

Question:
I am using Chilkat to retrieve a public/private key pair from the local machine certificate store. However, I was wondering if it was possible to use a custom certificate store under the LocalMachine store. I want to use one of the stores that is listed in the Certificates Snap-In. For example LocalMachine/MyService. That way I can managed the import of keys and which are available to my application.

Answer:
Yes, that is possible.

You will be calling Crypt2.SetSigningCert (or Crypt2.SetVerifyCert) and passing a Chilkat.Cert object to it. You can get that Cert object from any certificate store. In your case, you would begin with the Chilkat.CreateCS object to open a specific registry-based certificate store using the CreateCS.OpenRegistryStore method:
http://www.chilkatsoft.com/refdoc/csCreateCSRef.html#method008

This returns a Chilkat.CertStore object which you can use to fetch a Chilkat.Cert object using one of the Find* methods. (http://www.chilkatsoft.com/refdoc/csCertStoreRef.html)

The trick is to determine the registry path of the certificate store you need. You might have to do some digging through the registry…


Privacy Statement. Copyright 2000-2011 Chilkat Software, Inc. All rights reserved.
Send feedback to support@chilkatsoft.com

Components for Microsoft Windows XP, 2000, 2003 Server, Vista, Windows 7, and Windows 95/98/NT4.