Raise an error on syscall failure in tls_retry_write_records
[openssl.git] / test / pkey_meth_test.c
index ea77790a035b396fe089355795a00dc54e68c196..d3c6c7968439110ed17cc3a2862d7c6f0a34e3f4 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * Copyright 2016-2017 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2016-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
@@ -9,6 +9,9 @@
 
 /* Internal tests for EVP_PKEY method ordering */
 
+/* We need to use some deprecated APIs */
+#define OPENSSL_SUPPRESS_DEPRECATED
+
 #include <stdio.h>
 #include <string.h>
 
@@ -47,8 +50,9 @@ static int test_asn1_meths(void)
     return good;
 }
 
+#ifndef OPENSSL_NO_DEPRECATED_3_0
 /* Test of EVP_PKEY_METHOD ordering */
-static int test_pkey_meths()
+static int test_pkey_meths(void)
 {
     size_t i;
     int prev = -1;
@@ -74,10 +78,13 @@ static int test_pkey_meths()
     }
     return good;
 }
+#endif
 
-int setup_tests()
+int setup_tests(void)
 {
     ADD_TEST(test_asn1_meths);
+#ifndef OPENSSL_NO_DEPRECATED_3_0
     ADD_TEST(test_pkey_meths);
+#endif
     return 1;
 }