#include <cert.h>
Collaboration diagram for Chain:

Public Types | |
| root | |
| = 0 (self-signed) | |
| user | |
| = 1 (issuer and subject differ) | |
| enum | certtype { root, user } |
| Certificate types. More... | |
Public Member Functions | |
Constructors | |
| Chain () | |
| Constructor used to create an empty object. | |
| Chain (const str &x) | |
| Constructor used to load an array of certificates into a new object. | |
Object Reuse and Initialization | |
| void | clear () |
| Clear the Chain object, zeroizing all internal data members. | |
| void | add (const str &cer) |
| Append the specified certificate to the chain. | |
Inspectors | |
| int | count () const |
| Count certificates in the chain. | |
| str | index (int k) const |
| Get the kth certificate in the chain. | |
Search and Sort | |
| int | find (certtype flag) const |
| Locate a root or end-user certificate in the chain. | |
| int | find (const str &cer, certtype flag) const |
| Locate the parent or child of a given certificate in the chain. | |
| int | findmatch (const str &infolist, asn &info, asn &cert) const |
| Select from a list of CMS RecipientInfo or SignerInfo PDUs the one matching a specified certificate. | |
| int | sort () |
| Sort the chain in descending order and prune it. | |
| enum certtype |
Constructor used to load an array of certificates into a new object.
| x | a list of binary, ASN.1 DER-encoded certificates simply concatentated together. |
| void add | ( | const str & | cer | ) | [inline] |
Append the specified certificate to the chain.
| cer | a str containing the binary, ASN.1 DER-encoded certificate that is to be appended to the chain |
| int count | ( | ) | const |
Count certificates in the chain.
Locate the parent or child of a given certificate in the chain.
| cer | certificate whose parent or child is requested | |
| flag | 0 (or root) to find parent, 1 (or user) to find child |
| int find | ( | certtype | flag | ) | const |
Locate a root or end-user certificate in the chain.
| flag | 0 (or root) to find a self-signed certificate, 1 (or user) for an end-user certificate (i.e., a certificate whose subject DN does not appear as the issuer DN elsewhere in the chain). |
Select from a list of CMS RecipientInfo or SignerInfo PDUs the one matching a specified certificate.
| infolist | an array of PKCS #7 RecipientInfo or SignerInfo PDUs | |
| info | a pointer to the buffer that is to receive the matching RecipientInfo or SignerInfo PDU | |
| cert | the certificate to be matched in infolist. |
| str index | ( | int | k | ) | const |
Get the kth certificate in the chain.
| k | index of the certificate to return. |
| int sort | ( | ) |
Sort the chain in descending order and prune it.
| ISC Cryptographic Development Kit - User's Guide | |
| Questions? E-mail ISC technical support | |
| Copyright© 2002-2006 Information Security Corp. All rights reserved. |