for (File file : authorSignaturesList) {
try {
isWidgetValid = isSignatureValid(file, "author", widget);
if ((!isWidgetValid) && rejectInvalid) {
throw new InsecuredWidgetContentException(
"Rejecting invalid author signature " + file.getName());
}
if (!isWidgetValid && !rejectInvalid) {
_logger.warn("The author signature \'" + file.getName()
+ "\' is not valid, but widget will be imported");
}
} catch (Exception e) {
throw new BadAuthorSignatureException("Invalid Author Signature.");
}
}
for (File file : distributorSignaturesList) {
try {
isWidgetValid = isSignatureValid(file, "", widget);
if ((!isWidgetValid) && rejectInvalid) {
throw new InsecuredWidgetContentException(
"Rejecting invalid distributor signature " + file.getName());
}
if (!isWidgetValid && !rejectInvalid) {
_logger.warn("The distributor signature \'" + file.getName()
+ "\' is not valid, but widget will be imported");