use of de.carne.certmgr.jfx.crloptions.CRLOptionsController in project certmgr by hdecarne.
the class StoreController method onCmdRevokeCert.
@SuppressWarnings("unused")
@FXML
void onCmdRevokeCert(ActionEvent evt) {
UserCertStoreEntry entry = getSelectedStoreEntry();
if (entry != null) {
UserCertStoreEntry issuerEntry = entry.issuer();
if (!entry.isSelfSigned() && issuerEntry.hasPublicKey() && issuerEntry.hasKey()) {
try {
CRLOptionsController crlOptionsController = loadStage(CRLOptionsController.class).init(issuerEntry, this.userPreferences.expertMode.getBoolean(false));
crlOptionsController.revokeStoreEntry(entry, ReasonFlag.UNSPECIFIED);
crlOptionsController.showAndWait();
updateStoreEntryView();
} catch (IOException e) {
Alerts.unexpected(e).showAndWait();
}
} else {
Alerts.message(AlertType.WARNING, StoreI18N.formatSTR_MESSAGE_CANNOT_REVOKE_CRT(issuerEntry), ButtonType.OK).showAndWait();
}
}
}
use of de.carne.certmgr.jfx.crloptions.CRLOptionsController in project certmgr by hdecarne.
the class StoreController method onCmdManageCRL.
@SuppressWarnings("unused")
@FXML
void onCmdManageCRL(ActionEvent evt) {
UserCertStoreEntry issuerEntry = getSelectedStoreEntry();
if (issuerEntry != null) {
if (issuerEntry.hasPublicKey() && issuerEntry.hasKey()) {
try {
CRLOptionsController crlOptionsController = loadStage(CRLOptionsController.class).init(issuerEntry, this.userPreferences.expertMode.getBoolean(false));
crlOptionsController.showAndWait();
updateStoreEntryView();
} catch (IOException e) {
Alerts.unexpected(e).showAndWait();
}
} else {
Alerts.message(AlertType.WARNING, StoreI18N.formatSTR_MESSAGE_CANNOT_MANAGE_CRL(issuerEntry), ButtonType.OK).showAndWait();
}
}
}
Aggregations