try {
keyStoreEntry = keyStore.getEntry(entityID, keyPassword);
} catch (UnrecoverableEntryException e) {
log.error("Unable to retrieve keystore entry for entityID (keystore alias): " + entityID);
log.error("Check for invalid keystore entityID/alias entry password");
throw new SecurityException("Could not retrieve entry from keystore", e);
} catch (GeneralSecurityException e) {
log.error("Unable to retrieve keystore entry for entityID (keystore alias): " + entityID, e);
throw new SecurityException("Could not retrieve entry from keystore", e);
}
if (keyStoreEntry == null) {
log.debug("Keystore entry for entity ID (keystore alias) {} does not exist", entityID);
return Collections.emptySet();