signature.initVerify((PublicKey) key);
if (log.isLoggable(Level.FINE)) {
log.log(Level.FINE, "Signature provider:"+ signature.getProvider());
log.log(Level.FINE, "verifying with key: " + key);
}
si.canonicalize(context, new SignerOutputStream(signature));
if (getAlgorithm().equals(SignatureMethod.DSA_SHA1)) {
try {
return signature.verify(convertXMLDSIGtoASN1(sig));
} catch (IOException ioe) {