lib/samlr/signature.rb
def verify_signature!
      node      = original.at("#{prefix}/ds:Signature/ds:SignedInfo", NS_MAP)
      canoned   = node.canonicalize(C14N)

      unless x509.public_key.verify(signature_method.new, decoded_signature_value, canoned)
        raise SignatureError.new("Signature validation error: Possible canonicalization mismatch", "This canonicalizer returns #{canoned}")
      end
    end
def verify_signature!
      node      = original.at("#{prefix}/ds:Signature/ds:SignedInfo", NS_MAP)
      canoned   = node.canonicalize(C14N)

      unless x509.public_key.verify(signature_method.new, decoded_signature_value, canoned)
        raise SignatureError.new("Signature validation error: Possible canonicalization mismatch", "This canonicalizer returns #{canoned}")
      end
    end
Tests correctness of the signature (and hence digests)