]> www.wagner.pp.ru Git - openssl-gost/engine.git/blobdiff - test_sign.c
Delete .travis.yml
[openssl-gost/engine.git] / test_sign.c
index 4fca72b147c8dd8682adbe8278ae4242e3eac16b..57cf666fcb3f88d8483512fc7b945434b63f6459 100644 (file)
@@ -170,6 +170,7 @@ static int test_sign(struct test_sign *t)
     EVP_PKEY_free(pkey);
 #endif
 
+#if OPENSSL_VERSION_MAJOR >= 3
     /* Convert to DER and back, using OSSL_STORE API. */
     T(BIO_reset(bp));
     T(i2d_PrivateKey_bio(bp, priv_key));
@@ -177,7 +178,7 @@ static int test_sign(struct test_sign *t)
     fflush(stdout);
     pkey = NULL;
     OSSL_STORE_CTX *cts;
-    T(cts = OSSL_STORE_attach(bp, NULL, "file", NULL, NULL, NULL, NULL, NULL));
+    T(cts = OSSL_STORE_attach(bp, "file", NULL, NULL, NULL, NULL, NULL, NULL));
     for (;;) {
        OSSL_STORE_INFO *info = OSSL_STORE_load(cts);
        if (!info) {
@@ -199,6 +200,10 @@ static int test_sign(struct test_sign *t)
     } else
        printf(cCYAN "skipped\n" cNORM);
     BIO_free(bp);
+#else
+    T(BIO_reset(bp));
+    BIO_free(bp);
+#endif
 
     /* Convert to DER and back, using memory API. */
     unsigned char *kptr = NULL;