Fix the lack of isblank() with VMS C
[openssl.git] / test / evp_extra_test.c
index b8cfc0d204c2254169089e20eabcb9924929657b..5ca95e4fd64407bf82a00a865939d89f62c53e95 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2015-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
@@ -16,7 +16,7 @@
 #include <openssl/rsa.h>
 #include <openssl/x509.h>
 #include "testutil.h"
-#include "test_main.h"
+#include <internal/nelem.h>
 
 /*
  * kExampleRSAKeyDER is an RSA private key in ASN.1, DER format. Of course, you
@@ -197,7 +197,9 @@ typedef struct APK_DATA_st {
 static APK_DATA keydata[] = {
     {kExampleRSAKeyDER, sizeof(kExampleRSAKeyDER), EVP_PKEY_RSA},
     {kExampleRSAKeyPKCS8, sizeof(kExampleRSAKeyPKCS8), EVP_PKEY_RSA},
+#ifndef OPENSSL_NO_EC
     {kExampleECKeyDER, sizeof(kExampleECKeyDER), EVP_PKEY_EC}
+#endif
 };
 
 static EVP_PKEY *load_example_rsa_key(void)
@@ -345,13 +347,13 @@ static int test_EVP_PKCS82PKEY(void)
 }
 #endif
 
-void register_tests(void)
+int setup_tests(void)
 {
     ADD_TEST(test_EVP_DigestSignInit);
     ADD_TEST(test_EVP_DigestVerifyInit);
-    ADD_ALL_TESTS(test_d2i_AutoPrivateKey,
-                  sizeof(keydata) / sizeof(keydata[0]));
+    ADD_ALL_TESTS(test_d2i_AutoPrivateKey, OSSL_NELEM(keydata));
 #ifndef OPENSSL_NO_EC
     ADD_TEST(test_EVP_PKCS82PKEY);
 #endif
+    return 1;
 }