News  [SoftwareSite

Latest News
Older News
RSS Feed
Complete Projects
Useful Classes
Top Downloads
Message Board
Send Comments
Software License Buttons
Forums -> Security Library Forum
Reading a pfx file  
by Yaniv
posted on 2003/10/01

Hi all,

how can I read a pfx file in order to get the private key and the certificate (and also get the certificate attributes suzh as the issuer name etc.) using Microsoft VC++ 6.0 ?

by Pieter Philippaerts [Pieter at mentalis dot org]
posted on 2003/10/01

This forum is intended to discuss the Security Library -- not the Windows CryptoAPI. You can ask your questions on the public Microsoft newsgroups [].

by Marcus Shockley [silverbax at yahoo dot com]
posted on 2003/10/01

Related question:

Is there any sample code using the "CreateFromPfxFile" method of the Certificate class? I can do everything but aquire a private key when I load a pfx file...reading certs is not an issue, but I cannot use the private key from the pfx.

by Pieter Philippaerts [Pieter at mentalis dot org]
posted on 2003/10/01

Yes, take a look at the WebServer example project [Samples\SSL\WebServer] and the WebRequest project [Samples\Certificates\WebRequest].
We also have a page in the documentation that explains how to read PFX files:

by Ayman [radwan at ms dot com]
posted on 2004/02/19

I created a certificate by loading a pfx file and an exception is thrown when I tried to create SecureSocket object. The Exception is "If a certificate is specified it must have a private key". When I installed the pfx into IE, and I veiwed the certificate, there is a line saying that there is a private key associated with it!. Last note, I created the pfx file by exporting a pem file and one of the openssl param is inkey, to sepcify the private key. Any help is appreciated.



Copyright © 2002-2007, The Team. All rights reserved.
This site is located at
Send comments to the webmaster.