summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgregor herrmann <gregoa@debian.org>2023-12-15 22:06:12 +0100
committergregor herrmann <gregoa@debian.org>2023-12-15 22:06:12 +0100
commit2d2e5ae885fca06616eba23a1206439fbb61e3d2 (patch)
treea2dd67429b85367ad2bf2e3e2d59571ba8c58327
parentcfda8125f1929756272d20564d1e021094c96537 (diff)
parentfdcc3f408e2d50687a00d46a9e4a9419429677c7 (diff)
New upstream version 1.04
-rw-r--r--Changes4
-rw-r--r--MANIFEST1
-rw-r--r--META.yml2
-rw-r--r--README10
-rw-r--r--SIGNATURE37
-rw-r--r--lib/GnuPG/Interface.pm14
-rw-r--r--t/get_public_keys.t2
-rw-r--r--t/get_secret_keys.t2
-rw-r--r--t/list_secret_keys.t19
-rw-r--r--t/taint_mode.t2
-rw-r--r--test/secret-keys/1.2.2.test13
-rw-r--r--test/secret-keys/1.2.test2
12 files changed, 65 insertions, 43 deletions
diff --git a/Changes b/Changes
index 4b751a2..4213acb 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,9 @@
Revision history for GnuPG-Interface
+1.04 - 2023-12-12
+ - Use the included fake gpg for better test portability
+ - Update tests for gpg 2.4
+
1.03 - 2023-09-14
- Add fix for running in taint mode for Perl 5.38.0(thanks to Andrew Ruthven)
diff --git a/MANIFEST b/MANIFEST
index 9b4ea89..ae08b26 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -77,6 +77,7 @@ test/public-keys/2.1.test
test/public_keys.pgp
test/secret-keys/1.0.test
test/secret-keys/1.1.test
+test/secret-keys/1.2.2.test
test/secret-keys/1.2.test
test/secret-keys/2.0.test
test/secret_keys.pgp
diff --git a/META.yml b/META.yml
index 97ed694..ab8ded2 100644
--- a/META.yml
+++ b/META.yml
@@ -28,4 +28,4 @@ requires:
Scalar::Util: 0
resources:
license: http://dev.perl.org/licenses/
-version: '1.03'
+version: '1.04'
diff --git a/README b/README
index 2ef6dd4..55de163 100644
--- a/README
+++ b/README
@@ -68,16 +68,16 @@ DESCRIPTION
Another Process" in perlipc.
GnuPG Versions
- As of this version of GnuPG::Interface, there are two supported versions
- of GnuPG: 1.4.x and 2.2.x. The GnuPG download page
+ As of this version of GnuPG::Interface, there are three supported
+ versions of GnuPG: 1.4.x, 2.2.x, and 2.4.x. The GnuPG download page
<https://gnupg.org/download/index.html> has updated information on the
currently supported versions.
GnuPG released 2.0 and 2.1 versions in the past and some packaging
systems may still provide these if you install the default "gpg",
- "gnupg", "gnupg2", etc. packages. This modules supports only version
- 2.2.x, so you may need to find additional package repositories or build
- from source to get the updated version.
+ "gnupg", "gnupg2", etc. packages. 2.0 and 2.1 versions are not
+ supported, so you may need to find additional package repositories or
+ build from source to get the updated version.
OBJECT METHODS
Initialization Methods
diff --git a/SIGNATURE b/SIGNATURE
index acba576..93198cc 100644
--- a/SIGNATURE
+++ b/SIGNATURE
@@ -14,12 +14,12 @@ not run its Makefile.PL or Build.PL.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
-SHA256 91b53f531350d31d21c7e9f3104b7ef0d48a96e5c6ea9eaa64fa475d51c1bce2 Changes
-SHA256 1335737b60af96b1dd394fe1b04dc82a4023da6f9285c0a8abd77c7eaf8ed41e MANIFEST
+SHA256 914b1d734a8bfb2e1790216ae61c994ac01a407ade764fbae8bf3eaed6b3f218 Changes
+SHA256 9a3d14a50a9fbc4795dd9cf6aeeca3c577d6ac6e08250d51cb8afe3d529f97ec MANIFEST
SHA256 93d50f37fd222dbe3a8590a019f39d7a79ba725227b53ea6f9dd195830e2fb77 MANIFEST.SKIP
-SHA256 0531f930cd01f4e65819a463cf121a66c54a25533b85e97714e8abfd54098bab META.yml
+SHA256 65cf2e606a9231947d4c6bf732e196d0bfe06e7d65aede96d221089b94a6df8b META.yml
SHA256 d66b805878b178c170e04ea8e8c06bff2b83c43463e191fd38472360f60835b0 Makefile.PL
-SHA256 c0d74f2b2987828dc66017694f36454f429b5be29ca235db1e626f12d67cc1b2 README
+SHA256 5617f493744e229ff25cecf195de7861c322eb6b5d6b316bd1ecb91fc354df6b README
SHA256 cd5397bbe618f5bbd4e12a33b0cf5d21114e771c2dbd0ce28e2135beb52c35a8 inc/Module/Install.pm
SHA256 798836f9ccb8d204b1be31fc3835631f57e9d818b21a8f0d14bfcfb82ff4a72a inc/Module/Install/Base.pm
SHA256 d64cd4c16f83c5baf11f64a44bea3a0abc060a49da5aba040f0eb01394bf75ab inc/Module/Install/Can.pm
@@ -32,7 +32,7 @@ SHA256 d3d9b4583243c470ae895defa4c44564485b53693cba1c50ab0320768f443e97 inc/Modu
SHA256 21170a181c773923aa779477d62eed6357f44c9ab27b2abd216f097d78901c9e lib/GnuPG/Fingerprint.pm
SHA256 341fe948514a63dc081708c3a5356e0237ef1f333d964d99e9829a9e956f82d9 lib/GnuPG/Handles.pm
SHA256 fa9fca26659ef2baba11543b4cbcb141dc6d66191cea9bc07140a8cb3bccec9f lib/GnuPG/HashInit.pm
-SHA256 77ae56969e71a7109f1920edb389fedff97a74a791d3cc43b38fe73113818983 lib/GnuPG/Interface.pm
+SHA256 32b0f6871e31bb8dded183e887b65c172b329371b0bc7e6b9b943163119c7379 lib/GnuPG/Interface.pm
SHA256 f53d8e10107713b8c72d1e0ae13021964344ed205e412fb49621ada6fd32bf3e lib/GnuPG/Key.pm
SHA256 729f79dfaf58ba9d7321a8005f90a9dea1614b61556c50120bc323fe753e0022 lib/GnuPG/Options.pm
SHA256 de1dbcd19ece6fd939367f1132f08afdede2553e4c20028d08c186d10ec0d9c8 lib/GnuPG/PrimaryKey.pm
@@ -55,16 +55,16 @@ SHA256 5dadb07fda0101d02e9a7bcd81142d5f3c79ff0746cc2ec3d02db0056adc2e79 t/detach
SHA256 d2cd3e45ddcafc924573c675d9613203633fc37c1deeba0f4338781b550a9ab9 t/encrypt.t
SHA256 2f9d931effb1b8bfdb20c250ae7ad0cdfac1b9546408e2b1c722b8559f7d57f6 t/encrypt_symmetrically.t
SHA256 5bad9360f0e5cfe956c7aed6691da13a233eaf869d6b9c89d8717970f450035d t/export_keys.t
-SHA256 8f31e088ceb6dac7b61b23b5e6f2857ff377f371945df68e6f48bff443ca9588 t/get_public_keys.t
-SHA256 b1a0059daf0f74eb56a6bf644db37f50b0fb9fd8a0a4460b3b61b8a6e698e448 t/get_secret_keys.t
+SHA256 bba1c007605d318c39e86a32920ab86492032b694c8061471374622c74a8d8fb t/get_public_keys.t
+SHA256 84c267e9f4b07d19a82340924e6d32733026c4774d8f555b876e7ab65b1237a8 t/get_secret_keys.t
SHA256 e6551cf8c9b417e97ad7ae0ba17cba696420d0fd82f6dbfed906ba95c990a3ce t/import_keys.t
SHA256 3d1a6a667e365bcfe4fe21af2d13dfb0aced9077bf140cfa859b955ba9def388 t/list_public_keys.t
-SHA256 bc59185d9c1634eca69c08b9541556902f81cde96fc74ee898472abf05ff61b4 t/list_secret_keys.t
+SHA256 36b31c3626ce993f8b383758440f8da9d84269e5bb140c5f0a4c88006501b0e9 t/list_secret_keys.t
SHA256 233a3438cadd21602d821271e4f4d117e131b7d09098543c556689f3a00bb840 t/list_sigs.t
SHA256 998f85987922a9f55895b696808c677b036e199ba6054773cc0318ab55f21150 t/passphrase_handling.t
SHA256 dbba8768ec668f5963cda97b50ebf0bd4759cf53c7d584afe724e05f2e3ecc32 t/sign.t
SHA256 58dd4921945ed7347ba028f52c87fe5ea43487ec3c4765afb73e97686e277a15 t/sign_and_encrypt.t
-SHA256 33a8d7e5104d012d0e261ef8fbf1173323b8f9c0d3213abbb39f1088e9da0873 t/taint_mode.t
+SHA256 831355318808cb3be7b32afeec1ec8fbd2f6b9a90fb5d5e3c7f33f1c616ef16a t/taint_mode.t
SHA256 845140735d2be4acc0ae4c3459ef06646d26843584d370b18f49fcc17d27ccae t/verify.t
SHA256 f7c37ee27283212cbbbe15046060ae76007c346041a8111528a0a64efe4b4db1 t/version_updates.t
SHA256 4fe916000a3a23c7a06386252ae5731ffb5c08d2f03c07826908529844cc3c27 t/wrap_call.t
@@ -92,18 +92,19 @@ SHA256 ba075f34630a38dcc9d368f23ccfe0d6116d9eb05190bdb01337f76dffe96acd test/pub
SHA256 6b3ef18f32c501a3cfdd94644594055796271ac2634b21cb82c5126c60454de0 test/public_keys.pgp
SHA256 f37f6448e73bdb18977c459e949fa30e59e1d6abb3a0533005191112c8dd0e34 test/secret-keys/1.0.test
SHA256 53100dae1939540999ee2dea39e46077fdaa905870dea5e426eb5add32290619 test/secret-keys/1.1.test
-SHA256 8eb233c6c122e84cb3ccd758c1787300e93aeb38b16e986761a03455e2ed1f8c test/secret-keys/1.2.test
+SHA256 8eb233c6c122e84cb3ccd758c1787300e93aeb38b16e986761a03455e2ed1f8c test/secret-keys/1.2.2.test
+SHA256 6af01a4c0d8dcab51cf0a022ccc60b85300fc8ed8f9aa22de7710526698b0896 test/secret-keys/1.2.test
SHA256 83c081e123ec2453b42388865b8948e8bbc5276c739ee6087aad4cdc98f127a5 test/secret-keys/2.0.test
SHA256 b84cf371c144ae5bdb201c7a8fa0461562ac7d87395c94406b8611bc855d5bb3 test/secret_keys.pgp
SHA256 1fb329b56306f80d4c23398f2f8076b8f7fffa19fcda7193be24c8792807ea80 test/signed.1.asc
-----BEGIN PGP SIGNATURE-----
-iQEzBAEBCAAdFiEExJs3Lyv4ShkBFmAnDfCig/6sgLIFAmUEeREACgkQDfCig/6s
-gLK3dAgAoY9RnyW4Pkft/4XuAl6GVZ2AZ8Pj/xioYQWQsQt4R8TKK9N3061qtFMY
-kQ8gUv6K3SCw+yMSDNrZekFIEYNOLKzwhvLIg6TePmJqu6HqsqEYCKUDxBovJHx3
-3GOv2XGWwvPiLz60jM4/0JBnFJRX01eyxNmQGGqw1G48sVEf8ZR9dQS/3nv50jIT
-s1JH5l8pPI3qVEwu+4SEFpj4WC63TV71ymsnozJ49gQyd4/vG+onnp5EFPgiCHHy
-CzgHxHPrMG8PLhXsVUlp5GOiO6XYVxjxRRCvTMtGjb7B4LLtY9WNnw4ttHGN1uh4
-VblscWEmudvnUqv6e/fwJ2C344/+gA==
-=vwDX
+iQEzBAEBCAAdFiEExJs3Lyv4ShkBFmAnDfCig/6sgLIFAmV43p4ACgkQDfCig/6s
+gLIQ6wgAvW45WwBI9uA+ZqdJ0IPj+KSXIhh7anJEe8R0vfMEblgaBtFEHujai6CO
+IzM0RqwMYa+aWdwjwJv1jmjvwStaz+PR0+KGJyfEanTPGDCmcjwugtkTDj+rpXVV
+Zwr7vuB1izmyF1q4oXIMh75+w8CaFOoIiEV9FyXZBJfh+N0RKJAnlEhjazQhTMYK
+O3IG4LJ0/OsIjBOPqCW37DnHPD+GLZLM022jwnGHOsbxKGMXC++Gf0x2JkfxfXCr
+k8t6l1uZfEG5EcezkSaaih9qKhWffQZzOoctbIyEW2CO7qm/HgKZZnO05pNRwLUl
+c7J7oBZYYwErVFv+qBfNaF24eAv0tA==
+=5cp+
-----END PGP SIGNATURE-----
diff --git a/lib/GnuPG/Interface.pm b/lib/GnuPG/Interface.pm
index 1778c7d..353745e 100644
--- a/lib/GnuPG/Interface.pm
+++ b/lib/GnuPG/Interface.pm
@@ -29,7 +29,7 @@ use GnuPG::Options;
use GnuPG::Handles;
use Scalar::Util 'tainted';
-$VERSION = '1.03';
+$VERSION = '1.04';
has passphrase => (
isa => 'Any',
@@ -46,7 +46,7 @@ has call => (
# NB: GnuPG versions
#
-# There are now two supported versions of GnuPG: legacy 1.4 and stable 2.2
+# There are now three supported versions of GnuPG: legacy 1.4, 2.2, and 2.4.
# They are detected and each behave slightly differently.
#
# When using features specific to branches, check that the system's
@@ -988,16 +988,16 @@ L<perlipc/"Bidirectional Communication with Another Process">.
=head1 GnuPG Versions
-As of this version of GnuPG::Interface, there are two supported
-versions of GnuPG: 1.4.x and 2.2.x. The
+As of this version of GnuPG::Interface, there are three supported
+versions of GnuPG: 1.4.x, 2.2.x, and 2.4.x. The
L<GnuPG download page|https://gnupg.org/download/index.html> has
updated information on the currently supported versions.
GnuPG released 2.0 and 2.1 versions in the past and some packaging
systems may still provide these if you install the default C<gpg>,
-C<gnupg>, C<gnupg2>, etc. packages. This modules supports only
-version 2.2.x, so you may need to find additional package
-repositories or build from source to get the updated version.
+C<gnupg>, C<gnupg2>, etc. packages. 2.0 and 2.1 versions are not
+supported, so you may need to find additional package repositories
+or build from source to get the updated version.
=head1 OBJECT METHODS
diff --git a/t/get_public_keys.t b/t/get_public_keys.t
index 300c81c..8d8eebf 100644
--- a/t/get_public_keys.t
+++ b/t/get_public_keys.t
@@ -181,7 +181,7 @@ TEST
hex_id => 'ADB99D9C2E854A6B',
creation_date => 949813119,
creation_date_string => '2000-02-06',
- usage_flags => 'e',
+ usage_flags => $gnupg->cmp_version($gnupg->version, '2.3.8') >= 0 ? 'er' : 'e',
pubkey_data => $subkey_pub_data,
);
diff --git a/t/get_secret_keys.t b/t/get_secret_keys.t
index 5b4f97e..5fc2a57 100644
--- a/t/get_secret_keys.t
+++ b/t/get_secret_keys.t
@@ -87,7 +87,7 @@ TEST
hex_id => 'ADB99D9C2E854A6B',
creation_date => 949813119,
creation_date_string => '2000-02-06',
- usage_flags => 'e',
+ usage_flags => $gnupg->cmp_version($gnupg->version, '2.3.8') >= 0 ? 'er' : 'e',
pubkey_data => $subkey_pub_data,
};
diff --git a/t/list_secret_keys.t b/t/list_secret_keys.t
index 13a7ae2..44af61f 100644
--- a/t/list_secret_keys.t
+++ b/t/list_secret_keys.t
@@ -45,17 +45,20 @@ TEST
TEST
{
my $keylist;
- if ($gnupg->cmp_version($gnupg->version, '2.1') < 0) {
- $keylist = '0';
+ if ( $gnupg->cmp_version( $gnupg->version, '2.1' ) < 0 ) {
+ $keylist = '0';
+ }
+ elsif ( $gnupg->cmp_version( $gnupg->version, '2.1.11' ) <= 0 ) {
+ $keylist = '1';
+ }
+ elsif ( $gnupg->cmp_version( $gnupg->version, '2.3.8' ) < 0 ) {
+ $keylist = '2.2';
}
else {
- if ($gnupg->cmp_version($gnupg->version, '2.1.11') <= 0) {
- $keylist = '1';
- }
- else {
- $keylist = '2';
- }
+ $keylist = '2';
}
+
+
my @files_to_test = ( 'test/secret-keys/1.'.$keylist.'.test' );
return file_match( $outfile, @files_to_test );
diff --git a/t/taint_mode.t b/t/taint_mode.t
index b9d8df8..0311e5e 100644
--- a/t/taint_mode.t
+++ b/t/taint_mode.t
@@ -16,7 +16,7 @@ my $gnupg;
# See that we instantiate an object in Taint mode
TEST
{
- $gnupg = GnuPG::Interface->new( call => '/usr/bin/gpg' );
+ $gnupg = GnuPG::Interface->new( call => './test/fake-gpg-v2' );
};
# See that version is set
diff --git a/test/secret-keys/1.2.2.test b/test/secret-keys/1.2.2.test
new file mode 100644
index 0000000..42b27a1
--- /dev/null
+++ b/test/secret-keys/1.2.2.test
@@ -0,0 +1,13 @@
+test/gnupghome/pubring.kbx
+--------------------------
+sec dsa1024 2000-02-06 [SCA]
+ 93AFC4B1B0288A104996B44253AE596EF950DA9C
+uid [ unknown] GnuPG test key (for testing purposes only)
+uid [ unknown] Foo Bar (1)
+ssb elg768 2000-02-06 [E]
+
+sec rsa2048 2016-10-12 [SC]
+ 278F850AA702911F1318F0A61B913CE9B6747DDC
+uid [ unknown] GnuPG::Interface Test key <test@example.org>
+ssb rsa2048 2016-10-12 [E]
+
diff --git a/test/secret-keys/1.2.test b/test/secret-keys/1.2.test
index 42b27a1..4f8bc23 100644
--- a/test/secret-keys/1.2.test
+++ b/test/secret-keys/1.2.test
@@ -4,7 +4,7 @@ sec dsa1024 2000-02-06 [SCA]
93AFC4B1B0288A104996B44253AE596EF950DA9C
uid [ unknown] GnuPG test key (for testing purposes only)
uid [ unknown] Foo Bar (1)
-ssb elg768 2000-02-06 [E]
+ssb elg768 2000-02-06 [ER]
sec rsa2048 2016-10-12 [SC]
278F850AA702911F1318F0A61B913CE9B6747DDC