SHA512/224 and SHA512/256
[openssl.git] / test / rsa_test.c
index 47be25848f1f548471e566c3f901a3c6516485c5..2ad4de4734cd2c32f6ffb74bf9c07e34e60c983b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1999-2017 The OpenSSL Project Authors. All Rights Reserved.
  *
  * Licensed under the OpenSSL license (the "License").  You may not use
  * this file except in compliance with the License.  You can obtain a copy
@@ -12,7 +12,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#include "e_os.h"
+#include "internal/nelem.h"
 
 #include <openssl/crypto.h>
 #include <openssl/err.h>
 #include "testutil.h"
 
 #ifdef OPENSSL_NO_RSA
-void register_tests(void)
+int setup_tests(void)
 {
     /* No tests */
+    return 1;
 }
 #else
 # include <openssl/rsa.h>
@@ -42,7 +43,7 @@ void register_tests(void)
                         BN_bin2bn(dmq1, sizeof(dmq1)-1, NULL),  \
                         BN_bin2bn(iqmp, sizeof(iqmp)-1, NULL)); \
     memcpy(c, ctext_ex, sizeof(ctext_ex) - 1);                  \
-    return (sizeof(ctext_ex) - 1);
+    return sizeof(ctext_ex) - 1;
 
 static int key1(RSA *key, unsigned char *c)
 {
@@ -215,8 +216,8 @@ static int pad_unknown(void)
     unsigned long l;
     while ((l = ERR_get_error()) != 0)
         if (ERR_GET_REASON(l) == RSA_R_UNKNOWN_PADDING_TYPE)
-            return (1);
-    return (0);
+            return 1;
+    return 0;
 }
 
 static int rsa_setkey(RSA** key, unsigned char* ctext, int idx)
@@ -328,9 +329,10 @@ err:
     return ret;
 }
 
-void register_tests(void)
+int setup_tests(void)
 {
     ADD_ALL_TESTS(test_rsa_pkcs1, 3);
     ADD_ALL_TESTS(test_rsa_oaep, 3);
+    return 1;
 }
 #endif