X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=test%2Frsa_test.c;h=2ad4de4734cd2c32f6ffb74bf9c07e34e60c983b;hp=47be25848f1f548471e566c3f901a3c6516485c5;hb=4bed94f0c11ef63587c6b2edb03c3c438e221604;hpb=a9c6d221055c3a85edb23b1364cd60baafed4b9f diff --git a/test/rsa_test.c b/test/rsa_test.c index 47be25848f..2ad4de4734 100644 --- a/test/rsa_test.c +++ b/test/rsa_test.c @@ -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 #include -#include "e_os.h" +#include "internal/nelem.h" #include #include @@ -22,9 +22,10 @@ #include "testutil.h" #ifdef OPENSSL_NO_RSA -void register_tests(void) +int setup_tests(void) { /* No tests */ + return 1; } #else # include @@ -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