// see RFC 3280 http://www.ietf.org/rfc/rfc3280.txt
crlEntryExtensions.addExtension(
new Extension("2.5.29.21", Extension.NON_CRITICAL,
new ReasonCode(ReasonCode.KEY_COMPROMISE)));
// crl entry
X509CRLEntryImpl crlEntry = new X509CRLEntryImpl(
new TBSCertList.RevokedCertificate(
serialNumber,
new Date(),
crlEntryExtensions
),
issuer
);
assertNotNull(crlEntry.getExtensionValue("2.5.29.21"));
assertNull("Null value should be returned in the case of "
+ "nonexisting extension",
// demand absent Invalidity Date extension
// which OID is 2.5.29.24 (RFC 3280)
crlEntry.getExtensionValue("2.5.29.24"));
}