Introduce SSL_CTX_set_stateless_cookie_{generate,verify}_cb
[openssl.git] / test / testutil.h
index 006bfb3a6888d088b7fbab5c1b8a2b4cdbdc0f7c..639190564777f60576c57fd1040959a94fc68fb1 100644 (file)
@@ -186,6 +186,7 @@ DECLARE_COMPARISONS(char, char)
 DECLARE_COMPARISONS(unsigned char, uchar)
 DECLARE_COMPARISONS(long, long)
 DECLARE_COMPARISONS(unsigned long, ulong)
+DECLARE_COMPARISONS(time_t, time_t)
 /*
  * Because this comparison uses a printf format specifier that's not
  * universally known (yet), we provide an option to not have it declared.
@@ -282,7 +283,7 @@ void test_perror(const char *s);
  * a default description that indicates the file and line number of the error.
  *
  * The following macros guarantee to evaluate each argument exactly once.
- * This allows constructs such as: if(!TEST_ptr(ptr = OPENSSL_malloc(..)))
+ * This allows constructs such as: if (!TEST_ptr(ptr = OPENSSL_malloc(..)))
  * to produce better contextual output than:
  *      ptr = OPENSSL_malloc(..);
  *      if (!TEST_ptr(ptr))
@@ -336,6 +337,13 @@ void test_perror(const char *s);
 # define TEST_size_t_gt(a, b) test_size_t_gt(__FILE__, __LINE__, #a, #b, a, b)
 # define TEST_size_t_ge(a, b) test_size_t_ge(__FILE__, __LINE__, #a, #b, a, b)
 
+# define TEST_time_t_eq(a, b) test_time_t_eq(__FILE__, __LINE__, #a, #b, a, b)
+# define TEST_time_t_ne(a, b) test_time_t_ne(__FILE__, __LINE__, #a, #b, a, b)
+# define TEST_time_t_lt(a, b) test_time_t_lt(__FILE__, __LINE__, #a, #b, a, b)
+# define TEST_time_t_le(a, b) test_time_t_le(__FILE__, __LINE__, #a, #b, a, b)
+# define TEST_time_t_gt(a, b) test_time_t_gt(__FILE__, __LINE__, #a, #b, a, b)
+# define TEST_time_t_ge(a, b) test_time_t_ge(__FILE__, __LINE__, #a, #b, a, b)
+
 # define TEST_ptr_eq(a, b)    test_ptr_eq(__FILE__, __LINE__, #a, #b, a, b)
 # define TEST_ptr_ne(a, b)    test_ptr_ne(__FILE__, __LINE__, #a, #b, a, b)
 # define TEST_ptr(a)          test_ptr(__FILE__, __LINE__, #a, a)
@@ -440,4 +448,10 @@ int test_readstanza(STANZA *s);
  */
 void test_clearstanza(STANZA *s);
 
+/*
+ * Glue an array of strings together and return it as an allocated string.
+ * Optionally return the whole length of this string in |out_len|
+ */
+char *glue_strings(const char *list[], size_t *out_len);
+
 #endif                          /* HEADER_TESTUTIL_H */