throws XMLSecurityException {
if ((XMLSecurityConstants.Asym_Sig.equals(event.getAlgorithmUsage())
|| XMLSecurityConstants.Sym_Sig.equals(event.getAlgorithmUsage()))
&& sigProps.getSignatureAlgo() != null
&& !sigProps.getSignatureAlgo().equals(event.getAlgorithmURI())) {
throw new XMLSecurityException("empty", "The signature algorithm "
+ event.getAlgorithmURI() + " is not allowed");
} else if (XMLSecurityConstants.SigDig.equals(event.getAlgorithmUsage())
&& sigProps.getSignatureDigestAlgo() != null
&& !sigProps.getSignatureDigestAlgo().equals(event.getAlgorithmURI())) {
throw new XMLSecurityException("empty", "The signature digest algorithm "
+ event.getAlgorithmURI() + " is not allowed");
} else if (XMLSecurityConstants.SigC14n.equals(event.getAlgorithmUsage())
&& sigProps.getSignatureC14nMethod() != null
&& !sigProps.getSignatureC14nMethod().equals(event.getAlgorithmURI())) {
throw new XMLSecurityException("empty", "The signature c14n algorithm "
+ event.getAlgorithmURI() + " is not allowed");
} else if (XMLSecurityConstants.SigTransform.equals(event.getAlgorithmUsage())
&& !XMLSecurityConstants.NS_XMLDSIG_ENVELOPED_SIGNATURE.equals(event.getAlgorithmURI())
&& sigProps.getSignatureC14nTransform() != null
&& !sigProps.getSignatureC14nTransform().equals(event.getAlgorithmURI())) {
throw new XMLSecurityException("empty", "The signature transformation algorithm "
+ event.getAlgorithmURI() + " is not allowed");
}
}