Some signature schemes (such as ECDSA) allow for non-deterministic
signatures. Provide more information in test results by performing
verification of the constructed signature even when it does not match
the expected test case result: this allows us to distinguish between a
bug that is generating invalid signatures and a bug that is generating
valid but non-canonical signatures.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
okx ( asn1_compare ( asn1_built ( &builder ), &test->signature ) == 0,
file, line );
+ /* Test verification of constructed signature */
+ okx ( pubkey_verify ( pubkey, &test->public, digest, digestout,
+ asn1_built ( &builder ) ) == 0, file, line );
+
/* Free signature */
free ( builder.data );
}