final int caid = info.getIssuerDN().hashCode();
final String username = info.getUsername();
assertAuthorizedToCA(admin, caid, username, LogConstants.EVENT_ERROR_REVOKEDENDENTITY);
int certificateProfileId = info.getCertificateProfileId();
String userDataDN = info.getSubjectDN();
final CertReqHistory certReqHistory = certificateStoreSession.getCertReqHistory(admin, certserno, issuerdn);
UserData data = null;
if (certReqHistory == null || XkmsConfiguration.getEnabled()) {
// We could use userdata later, so try to find it
data = UserData.findByUsername(entityManager, username);
}
int endEntityProfileId = -1;
if (certReqHistory != null) {
// Get the EEP that was used in the original issuance, if we can find it
endEntityProfileId = certReqHistory.getUserDataVO().getEndEntityProfileId();
// Republish with the same user DN that was used in the original publication, if we can find it
userDataDN = certReqHistory.getUserDataVO().getDN();
// If for some reason the certificate profile id was not set in the certificate data, try to get it from the certreq history
if (certificateProfileId == SecConst.CERTPROFILE_NO_PROFILE) {
certificateProfileId = certReqHistory.getUserDataVO().getCertificateProfileId();
}
} else if (data != null) {
// Get the EEP that is currently used as a fallback, if we can find it
endEntityProfileId = data.getEndEntityProfileId();
// Republish with the same user DN that is currently used as a fallback, if we can find it