|
Location: Desktop development - C/C++ License: The Intelliproject Open License (IPOL) Exporting a digital certificate to a PFX filePosted by Silviu CarageaA simple way to export a digital certificate to a PFX file |
Skill: IntermediatePosted: 04/10/2008Views: 867Rating: 4.50 /5Popularity: 1.35 |
| Sign Up to vote for this article |
A certificate is a set of data that identifies an entity. A trusted organization assigns a certificate to an individual or an entity that associates a public key with the individual. The individual or entity to whom a certificate is issued is called the subject of that certificate. The trusted organization that issues the certificate is a certification authority (CA) and is known as the certificate's issuer. A trustworthy CA will only issue a certificate after verifying the identity of the certificate's subject.
A PFX file contains all the information that makes up an X.509 Digital Certificate that can be to authenticate a person or device, such as a computer or Web server.
You can export your PFX files programmatically using Microsoft Cryptography API which is an application programming interface included with Microsoft Windows operating systems that provides services to enable developers to secure Windows-based applications using cryptography. It is a set of dynamically-linked libraries that provides an abstraction layer which isolates programmers from the code used to encrypt the data.
The attached source code exports all your certificates including your private key from your personal certificate store.
CExpCertificate methods:
BOOL ExportCertificate(wchar_t* szPassword) - szPassword represent a password used to encrypt and verify the PFX packet.VOID WritePFX(CRYPT_DATA_BLOB* pPFX, char* szOutputFile) – used to save your pfx file on your hdd.This article, along with any associated source code and files, is licensed under The Intelliproject Open License (IPOL)
| Silviu Caragea
| Silviu Caragea is the Founder, Administrator and Chief Editor who wrote and runs The IntelliProject. He's been programming since 2000 and now he's student at The Faculty of Economic Cybernetics, Statistics and Informatics from Bucharest. In the same time he's working as software developer at Cratima Software, a Romanian software and web design company that activates both on the local and foreign market, providing its customers with software development services, internet and intranet solutions, web design, graphic design and IT consultancy. His programming experience includes: - C,C++, Visual C++(Win32 API, MFC, ADO, STL, DAO, ODBC, ATL, COM, DirectShow, DirectDraw, WTL) - Open Source libraries :CURL & Boost - HTML, CSS - Java (SE,ME) - JavaScript, Ajax, Google Web Toolkit (GWT) - Php, MySQL -Oracle, PL SQL - C# .NET -Objective C, IPhone SDK, Cocoa Location: |
Sign up to post message on the article message board!