log.debug("Signature provider:" + signature.getProvider());
log.debug("Verifying with key: " + key);
log.debug("JCA Algorithm: " + getJCAAlgorithm());
log.debug("Signature Bytes length: " + sig.length);
}
si.canonicalize(context, new SignerOutputStream(signature));
try {
Type type = getAlgorithmType();
if (type == Type.DSA) {
int size = ((DSAKey)key).getParams().getQ().bitLength();