]> www.wagner.pp.ru Git - openssl-gost/engine.git/blobdiff - test_tls.c
MSVC: Replace variable-length automatic arrays with alloca
[openssl-gost/engine.git] / test_tls.c
index 216fb2a8f263d5922a70d1f2733134011f841057..b1d0865fd365433d3912d26c0ef04f79c024f0e0 100644 (file)
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
+#ifdef __GNUC__
 /* For X509_NAME_add_entry_by_txt */
-#pragma GCC diagnostic ignored "-Wpointer-sign"
+# pragma GCC diagnostic ignored "-Wpointer-sign"
+#endif
 
 #define T(e) ({ if (!(e)) { \
                ERR_print_errors_fp(stderr); \
@@ -355,13 +357,7 @@ 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));
 
     char *p;
     if ((p = getenv("VERBOSE")))
@@ -377,9 +373,6 @@ int main(int argc, char **argv)
     ret |= test("gost2012_512", "B");
     ret |= test("gost2012_512", "C");
 
-    ENGINE_finish(eng);
-    ENGINE_free(eng);
-
     if (ret)
        printf(cDRED "= Some tests FAILED!\n" cNORM);
     else