2baf2b6
From cf6ef66ab447c696d465d3d1123685c2f281e8c2 Mon Sep 17 00:00:00 2001
2baf2b6
From: Niko Tyni <ntyni@debian.org>
2baf2b6
Date: Sat, 23 Apr 2016 16:49:57 +0300
2baf2b6
Subject: [PATCH] Use an encryption key in the test suite
2baf2b6
2baf2b6
While encrypting without calling setkey() used to work before libgcrypt
2baf2b6
1.7.0, this was accidental and not supported.  It causes a SIGSEGV in
2baf2b6
1.7.0 and will return an error in future versions.
2baf2b6
2baf2b6
See <http://thread.gmane.org/gmane.comp.encryption.gpg.libgcrypt.devel/4487>
2baf2b6
2baf2b6
Bug-Debian: https://bugs.debian.org/816104
2baf2b6
---
2baf2b6
 t/01-cipher.t | 1 +
2baf2b6
 1 file changed, 1 insertion(+)
2baf2b6
2baf2b6
diff --git a/t/01-cipher.t b/t/01-cipher.t
2baf2b6
index 3f7de37..0bbdf0a 100644
2baf2b6
--- a/t/01-cipher.t
2baf2b6
+++ b/t/01-cipher.t
2baf2b6
@@ -102,6 +102,7 @@ ok(substr($d, 0, length $p) eq $p)
2baf2b6
                             algorithm => 'aes',
2baf2b6
                             padding => 'none'
2baf2b6
     );
2baf2b6
+    $c->setkey($key);
2baf2b6
     $c->start('encrypting');
2baf2b6
     ok(!eval {my $e2 = $c->encrypt('aaa'); 1});  # this should die
2baf2b6
     ok(eval { my $e2 = $c->encrypt('aaaaaaaaaaaaaaaa') . $c->finish; 1 });  # this should not die
2baf2b6
-- 
2baf2b6
2.8.0.rc3
2baf2b6