doc: add OpenSSL logo
[openssl.git] / test / ecdsatest.c
index f99817898f221d38784849668d29ffcdff77ceee..9747fb9042a4dd34a812d5ce752972579236d933 100644 (file)
@@ -8,6 +8,11 @@
  * https://www.openssl.org/source/license.html
  */
 
+/*
+ * Low level APIs are deprecated for public use, but still ok for internal use.
+ */
+#include "internal/deprecated.h"
+
 #include <openssl/opensslconf.h> /* To see if OPENSSL_NO_EC is defined */
 #include "testutil.h"
 
@@ -379,11 +384,13 @@ static int test_builtin_as_ec(int n)
     return test_builtin(n, EVP_PKEY_EC);
 }
 
+# ifndef OPENSSL_NO_SM2
 static int test_builtin_as_sm2(int n)
 {
     return test_builtin(n, EVP_PKEY_SM2);
 }
-#endif
+# endif
+#endif /* OPENSSL_NO_EC */
 
 int setup_tests(void)
 {
@@ -396,7 +403,9 @@ int setup_tests(void)
         || !TEST_true(EC_get_builtin_curves(curves, crv_len)))
         return 0;
     ADD_ALL_TESTS(test_builtin_as_ec, crv_len);
+# ifndef OPENSSL_NO_SM2
     ADD_ALL_TESTS(test_builtin_as_sm2, crv_len);
+# endif
     ADD_ALL_TESTS(x9_62_tests, OSSL_NELEM(ecdsa_cavs_kats));
 #endif
     return 1;