use of de.carne.certmgr.certs.x509.ReasonFlag in project certmgr by hdecarne.
the class CRLOptionsController method initEntries.
private void initEntries() throws IOException {
ObservableList<CRLEntryModel> entryItems = this.ctlEntryOptions.getItems();
for (UserCertStoreEntry issuedEntry : this.issuerEntryParam.get().issuedEntries()) {
BigInteger issuedSerial = issuedEntry.getCRT().getSerialNumber();
boolean revoked = false;
ReasonFlag reason = ReasonFlag.UNSPECIFIED;
Date date = null;
if (this.issuerEntryParam.get().hasCRL()) {
X509CRL crl = this.issuerEntryParam.get().getCRL();
X509CRLEntry crlEntry = crl.getRevokedCertificate(issuedSerial);
if (crlEntry != null) {
revoked = true;
CRLReason crlEntryReason = crlEntry.getRevocationReason();
if (crlEntryReason != null) {
reason = ReasonFlag.fromCRLReason(crlEntryReason);
}
date = crlEntry.getRevocationDate();
}
}
entryItems.add(new CRLEntryModel(issuedEntry, revoked, issuedSerial, reason, date));
}
entryItems.sort((o1, o2) -> o1.compareTo(o2));
}
Aggregations