Remove misleading diagnostics on pinned sender cert in OSSL_CMP_validate_msg()
[openssl.git] / test / casttest.c
index 24cfbfd4554c95151b7bf8f447464dc99b7d64a2..5bc47e824ad27c5c9911a1056be107ebf088cc7d 100644 (file)
@@ -1,18 +1,24 @@
 /*
- * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
  *
- * Licensed under the OpenSSL license (the "License").  You may not use
+ * Licensed under the Apache License 2.0 (the "License").  You may not use
  * this file except in compliance with the License.  You can obtain a copy
  * in the file LICENSE in the source distribution or at
  * https://www.openssl.org/source/license.html
  */
 
+/*
+ * CAST low level APIs are deprecated for public use, but still ok for
+ * internal use.
+ */
+#include "internal/deprecated.h"
+
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 
 #include <openssl/opensslconf.h> /* To see if OPENSSL_NO_CAST is defined */
-#include "e_os.h"
+#include "internal/nelem.h"
 #include "testutil.h"
 
 #ifndef OPENSSL_NO_CAST
@@ -102,10 +108,11 @@ static int cast_test_iterations(void)
 }
 #endif
 
-void register_tests(void)
+int setup_tests(void)
 {
 #ifndef OPENSSL_NO_CAST
     ADD_ALL_TESTS(cast_test_vector, OSSL_NELEM(k_len));
     ADD_TEST(cast_test_iterations);
 #endif
+    return 1;
 }