id.getIdentifier());
return false;
}
// now, check the signature:
VerificationResult verificatioResult;
try {
verificatioResult = verifier.verify(xrd.getDocument(), xrd.getSignature());
} catch (XmlSimpleSignException e) {
logger.log(Level.WARNING, "signature on XRD from " + xrd.getSource() +
"did not verify", e);
return false;
}
// finally, validate the signing cert (make sure it belongs to the authority
// that is supposed to have signed this XRD). If we're not given an
// authority, the XRD should be signed by the entity identified in the
// canonical id.
authority = (authority == null) ? canonicalId : authority;
return certValidator.matches(verificatioResult.getCerts().get(0), authority);
}