]> www.wagner.pp.ru Git - openssl-gost/engine.git/blobdiff - test_sign.c
MSVC: Fix include files
[openssl-gost/engine.git] / test_sign.c
index d785b75b2dc49c5256a4e25584b7e3884bedea70..e18acc1bb0692c7ba876c8d3888566f1e51325f0 100644 (file)
 #include <string.h>
 #include <stdlib.h>
 
-#define T(e) ({ if (!(e)) { \
-               ERR_print_errors_fp(stderr); \
-               OpenSSLDie(__FILE__, __LINE__, #e); \
-           } \
-        })
-#define TE(e) ({ if (!(e)) { \
-               ERR_print_errors_fp(stderr); \
-               fprintf(stderr, "Error at %s:%d %s\n", __FILE__, __LINE__, #e); \
-               return -1; \
-           } \
-        })
+#define T(e) \
+    if (!(e)) { \
+        ERR_print_errors_fp(stderr); \
+        OpenSSLDie(__FILE__, __LINE__, #e); \
+    }
+#define TE(e) \
+    if (!(e)) { \
+        ERR_print_errors_fp(stderr); \
+        fprintf(stderr, "Error at %s:%d %s\n", __FILE__, __LINE__, #e); \
+        return -1; \
+    }
 
 #define cRED   "\033[1;31m"
 #define cDRED  "\033[0;31m"
@@ -47,7 +47,7 @@
 
 struct test_sign {
     const char *name;
-    unsigned int nid;
+    int nid;
     size_t bits;
     const char *paramset;
 };
@@ -177,7 +177,7 @@ static int test_sign(struct test_sign *t)
     fflush(stdout);
     pkey = NULL;
     OSSL_STORE_CTX *cts;
-    T(cts = OSSL_STORE_attach(bp, "file", NULL, NULL, NULL, NULL, NULL, NULL));
+    T(cts = OSSL_STORE_attach(bp, "file", NULL, NULL, NULL, NULL, NULL, NULL, NULL));
     for (;;) {
        OSSL_STORE_INFO *info = OSSL_STORE_load(cts);
        if (!info) {
@@ -239,7 +239,7 @@ static int test_sign(struct test_sign *t)
     const EC_GROUP *group = EC_KEY_get0_group(ec);
     int curve_name = EC_GROUP_get_curve_name(group);
     err = curve_name == t->nid;
-    printf("\tcurve_name (%u):\t", t->nid);
+    printf("\tcurve_name (%d):\t", t->nid);
     print_test_tf(err, curve_name, "match", "mismatch");
     ret |= !err;