}
// Request the KeyStore from the CA
ResponseData keyStoreResponse = getRequestDispatcher().getKeyStoreResponse(username, password);
// Check if got a valid result
if (keyStoreResponse == null) {
context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, getMessage("enroll.noresponse"), null));
log.error("KeyStore request for '" + username + "' failed. No response from CA.");
return;
} else if (keyStoreResponse.getErrorMessage() != null) {
context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, getMessage("enroll.keystore.couldnotcreate"), null));
log.info("KeyStore request for '" + username + "' failed. " + keyStoreResponse.getErrorMessage());