Certificate utilities
Last updated August 3, 1999
The following is a set of files to use in decoding those nasty MIME base-64 encoded, ASN.1 encoded X.509 (whew) certificates that the Netscape Enterprise Server provides in the CLIENT_CERT CGI environment variable, or the NSAPI auth-cert in rq->vars parameter block. The file certutil.c contains a main() function that can be used to play with the library so you can get a feel for calling the certificate processing functions. The header before main() will tell you how to compile the source into an executable. Here are the relevent files:
| COPYING | GNU public domain licensing information. I have released this source to the public domain. If you decide to distribute any of the sources below, be sure to include this file and retain any headers in the sources. |
| certutil.c |
Updated August 3, 1999 — Added certificate extension extracting function. Updated December 3, 1998 — Fixed byte ordering of certificate version on little-endian machines. Updated September 2, 1998 — Fixed handling of common name when SETs contained multiple SEQUENCEs. This file contains the public function source, as well as a test program. |
| certutil.h | Function prototypes for certutil.c |
| b64dec.c | Updated August 17, 1998 This file contains source to decode MIME base-64 encoded blocks. It is used by functions in certutil.c, and can be used to pre-process encoded certificates to get sizing information. |
| list.h | Inline (well, not with HPUX cc) list manipulation functions used by certutil.c. |