use of org.mozilla.jss.asn1.BOOLEAN in project jss by dogtagpki.
the class PKIArchiveOptions method encode.
/**
* DER-encodes a PKIArchiveOptions.
* @param implicitTag <b>This parameter is ignored.</b> A CHOICE cannot
* have an implicit tag.
*/
@Override
public void encode(Tag implicitTag, OutputStream ostream) throws IOException {
// no implicit tags on a CHOICE
assert (implicitTag.equals(tag));
if (type == ENCRYPTED_PRIV_KEY) {
// CHOICEs are always EXPLICITly tagged
EXPLICIT explicit = new EXPLICIT(new Tag(0), encryptedPrivKey);
explicit.encode(tag, ostream);
} else if (type == KEY_GEN_PARAMETERS) {
keyGenParameters.encode(tag, ostream);
} else {
assert (type == ARCHIVE_REM_GEN_PRIV_KEY);
(new BOOLEAN(archiveRemGenPrivKey)).encode(tag, ostream);
}
}
Aggregations