tests: fix checks for illegal curves

The openssl check for unknown curve names simply looks for a specific
string. Old openssl printed this but didn't error, but new openssl
errors out.  Update the check firstly to fail on error then check the

Additionally some vTPMs have started supporting the SM2 curve.  When
it works in openssl it has the problem that it's only allowed with the
SM3 hash, which won't work with any of the generic hash looping tests,
so disable testing the SM2 curve.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
5 files changed