]> www.wagner.pp.ru Git - openssl-gost/engine.git/blobdiff - test_curves.c
tcl_tests: ca.try: Ignore openssl crl exit status for 'corrupted CRL' test
[openssl-gost/engine.git] / test_curves.c
index 0b8b8f62fe01af2a8f6460e7947887837531cc08..865ee8d2d4e3c2bb0bc3eb24f66229c04917e83a 100644 (file)
@@ -5,7 +5,11 @@
  * See https://www.openssl.org/source/license.html for details
  */
 
-#include "e_gost_err.h"
+#ifdef _MSC_VER
+# pragma warning(push, 3)
+# include <openssl/applink.c>
+# pragma warning(pop)
+#endif
 #include "gost_lcl.h"
 #include <openssl/evp.h>
 #include <openssl/rand.h>
 #include <openssl/bn.h>
 #include <string.h>
 
-#define T(e) ({ if (!(e)) { \
-               ERR_print_errors_fp(stderr); \
-               OpenSSLDie(__FILE__, __LINE__, #e); \
-           } \
-        })
+#define T(e) \
+    if (!(e)) { \
+        ERR_print_errors_fp(stderr); \
+        OpenSSLDie(__FILE__, __LINE__, #e); \
+    }
 
 #define cRED   "\033[1;31m"
 #define cDRED  "\033[0;31m"
@@ -225,22 +229,11 @@ int main(int argc, char **argv)
 {
     int ret = 0;
 
-    setenv("OPENSSL_ENGINES", ENGINE_DIR, 0);
-    OPENSSL_add_all_algorithms_conf();
-    ERR_load_crypto_strings();
-    ENGINE *eng;
-    T(eng = ENGINE_by_id("gost"));
-    T(ENGINE_init(eng));
-    T(ENGINE_set_default(eng, ENGINE_METHOD_ALL));
-
     struct test_curve *tc;
     for (tc = test_curves; tc->nid; tc++) {
        ret |= parameter_test(tc);
     }
 
-    ENGINE_finish(eng);
-    ENGINE_free(eng);
-
     if (ret)
        printf(cDRED "= Some tests FAILED!" cNORM "\n");
     else