// the load function checks the integrity of the keystore.
try
{
keyStore.load(fis, password1.toCharArray());
}
catch (IOException ioe)
{
log.error("Not a valid keystore. " + ioe.getMessage());
request.setAttribute("errorMessage", ioe.getMessage());
this.forwardToTemplate(request, response, adminTemplate);
return;
}
Unfortunately this goes against my rule for using errors to discriminate bad inputs. But for me to do the research and build some sort of keystore validator would be a waste... So we do this.
No comments:
Post a Comment