diff --git a/tests/common.c b/tests/common.c index 18a56148..2ee4689d 100644 --- a/tests/common.c +++ b/tests/common.c @@ -61,6 +61,15 @@ void print_hex(const char* what, const void* v, const unsigned long l) } } +int do_compare_testvector(const void* is, const unsigned long is_len, const void* should, const unsigned long should_len, const char* what, int which) +{ + if (compare_testvector(is, is_len, should, should_len, what, which) == 0) { + return CRYPT_OK; + } else { + return CRYPT_FAIL_TESTVECTOR; + } +} + prng_state yarrow_prng; /* ref: $Format:%D$ */ diff --git a/tests/common.h b/tests/common.h index 410db1e8..1ba88207 100644 --- a/tests/common.h +++ b/tests/common.h @@ -25,6 +25,8 @@ void run_cmd(int res, int line, const char *file, const char *cmd, const char *a void print_hex(const char* what, const void* v, const unsigned long l); +int do_compare_testvector(const void* is, const unsigned long is_len, const void* should, const unsigned long should_len, const char* what, int which); + #endif /* DEMOS_COMMON_H_ */ /* ref: $Format:%D$ */