add check to ensure only invalid ASN1 gives InvalidSignature in DSA