|
|||||
Posted by Matt Messier on Tue, Dec 02, 2003 (03:37 AM) GMT [Submitted by Sascha Kiefer]
Problem Recipe 10.11 in the book "Secure Programming Cookbook for C and C++" showed an example of how to retrieve CRLs from a CA specified as a URL in the extension properties of an X.509 Certificate. The code presented in book used its own "search" function to find a
cRLDistributionPoints extension in the certificate, and the Win32 WinInet functions to download the CRL from an HTTP or HTTPS location. Other types of URLs are possible as well, including LDAP and FTP; however, the code presented in the book does not support anything other than HTTP and HTTPS.Solution Newer versions of CryptoAPI provides two functions that help to get the CRL information, and can be used in place of the
GetDistrubtionPoint() and SpcRetrieveCRL() functions presented in Recipe 10.11. The two functions are:
Both are declared in wincrypt.h and require the Cryptnet.lib import library. Note that these functions are only available on Windows 2000, XP, and newer. Discussion |
![]() |
All trademarks and copyrights on this page are owned by their respective owners. Copyrights on submitted material are copyrighted by the submitter. Everything else is Copyright © 2003 by John Viega and Matt Messier. Click here for licensing information regarding the use of recipes on this site and from The Secure Programming Cookbook for C and C++. |