News  [SoftwareSite

Latest News
Older News
RSS Feed
 
Complete Projects
Useful Classes
Top Downloads
Message Board
AllAPI.net
 
Send Comments
Software License
Mentalis.org Buttons
Donate
 
Forums -> Security Library Forum
 
Certificate.CreateFromX509Certificate  
by Oleg [BurlachenkoO at mail dot ru]
posted on 2005/02/02

When I call this method on X509Certificate, that have association with private key, created Certificate object doesn't have private key. Why?
Is it possible to create a Certificate object initialized with the private key from certificate store(do not call AssociateWithPrivateKey method)?

by Pieter Philippaerts [Pieter at mentalis dot org]
posted on 2005/03/25

CreateFromX509Certificate loads a certificate from a .CER file, and .CER files do not contain private keys. If you want to use a filetype that does contain private keys, you should use .PFX.

If you have the certificate and its private key in a certificate store, you should use the CertificateStore class to load it. If you do it like this, your certificate won't lose its connection with the private key.

 

Copyright © 2002-2007, The Mentalis.org Team. All rights reserved.
This site is located at http://www.mentalis.org/
Send comments to the webmaster.