diff options
Diffstat (limited to 'trust/tests/test-data.h')
-rw-r--r-- | trust/tests/test-data.h | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/trust/tests/test-data.h b/trust/tests/test-data.h index 9789493..e4ff938 100644 --- a/trust/tests/test-data.h +++ b/trust/tests/test-data.h @@ -37,15 +37,43 @@ #ifndef TEST_DATA_H_ #define TEST_DATA_H_ -void test_check_object (CuTest *cu, +#define test_check_object(cu, attrs, klass, label) \ + test_check_object_msg (cu, __FILE__, __LINE__, attrs, klass, label) + +void test_check_object_msg (CuTest *cu, + const char *file, + int line, CK_ATTRIBUTE *attrs, CK_OBJECT_CLASS klass, const char *label); -void test_check_cacert3_ca (CuTest *cu, +#define test_check_cacert3_ca(cu, attrs, label) \ + test_check_cacert3_ca_msg (cu, __FILE__, __LINE__, attrs, label) + +void test_check_cacert3_ca_msg (CuTest *cu, + const char *file, + int line, CK_ATTRIBUTE *attrs, const char *label); +#define test_check_attrs(cu, expected, attrs) \ + test_check_attrs_msg (cu, __FILE__, __LINE__, expected, attrs) + +void test_check_attrs_msg (CuTest *cu, + const char *file, + int line, + CK_ATTRIBUTE *expected, + CK_ATTRIBUTE *attrs); + +#define test_check_attr(cu, expected, attr) \ + test_check_attr_msg (cu, __FILE__, __LINE__, expected, attr) + +void test_check_attr_msg (CuTest *cu, + const char *file, + int line, + CK_ATTRIBUTE *expected, + CK_ATTRIBUTE *attr); + static const unsigned char test_cacert3_ca_der[] = { 0x30, 0x82, 0x07, 0x59, 0x30, 0x82, 0x05, 0x41, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x03, 0x0a, 0x41, 0x8a, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, |