/*
- * 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
#include <stdio.h>
#include <string.h>
-#include "e_os.h"
+#include "internal/nelem.h"
#include <openssl/crypto.h>
#include <openssl/err.h>
#include <openssl/rand.h>
#include <openssl/bn.h>
-#include "test_main.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>
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)
{
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)
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