- * This object is how we store certs, both when caching them (explicitly or
- * during a search), and as an intermediate stage during template (TBS, or
- * to-be-signed cert) construction. This is a subclass of the SNACC-generated class
- * Certificate; the main functionality we add is the parsing and decoding of
- * Extensions. Extensions are not decoded in class Certificate beyond the level
- * of the X.509 Extension object, which just contains the ID (an OID), the
- * critical flag, and an octet string containing an ID-specific thing.
- *
- * When we decode a cert or a TBS, we also parse the Extension objects, decoding
- * then into specific SNACC classes like KeyUsage or BasicConstriantsSyntax. We
- * keep these decoded extensions in a list of DecodedExten structs. GetCertField
- * ops which access extensions access these DecodedExten structs.
- *
- * When creating a cert template (TBS), each incoming field associated with an
- * extension is translated into an object like a (SNACC) KeyUsage and stored in
- * our DecodedExten list.
- *
- * When encoding a TBS, we BER-encode each of the SNACC objects (KeyUsage, etc.)
- * in our list of DecodedExtens, wrapthe result in an Octet string (actually an
- * AsnOcts) and store it in the SNACC-generated CertificateToSign's extensions
- * list.
- *
- * Support for extensions which we don't understand is handled as follows. When
- * setting cert fields for such extensions during template construction, the app
- * has to BER-encode the underlying extension. We just wrap this in an octet string
- * (AsnOcts) and store the result in a DecodedExten without further ado. When
- * encoding the TBS, this octet string is just copied into the CertificateToSign's
- * Extension list without further ado. When decoding a cert, if we find an
- * extension we don't understand, the SNACC object stored in the DecodedExten
- * is just a copy of the AsnOcts (which is the BER encoding of the underlying
- * mystery extension wrapped in an Octet string). We pass back the Octet string's
- * contents (*not* the BER-encoded octet string) during a GetCertField op.