You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
266 lines
9.7 KiB
266 lines
9.7 KiB
7 years ago
|
From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
|
||
|
Date: Tue, 11 Oct 2016 20:05:16 -0400
|
||
|
Subject: use fingerprints as inputs during tests to demonstrate explicit usage
|
||
|
|
||
|
---
|
||
|
README | 6 +++---
|
||
|
lib/GnuPG/Interface.pm | 6 +++---
|
||
|
lib/GnuPG/Options.pm | 2 +-
|
||
|
t/MyTestSpecific.pm | 2 +-
|
||
|
t/encrypt.t | 6 +++---
|
||
|
t/export_keys.t | 4 ++--
|
||
|
t/get_public_keys.t | 2 +-
|
||
|
t/get_secret_keys.t | 2 +-
|
||
|
t/list_public_keys.t | 4 ++--
|
||
|
t/list_secret_keys.t | 4 ++--
|
||
|
t/list_sigs.t | 4 ++--
|
||
|
t/sign_and_encrypt.t | 2 +-
|
||
|
12 files changed, 22 insertions(+), 22 deletions(-)
|
||
|
|
||
|
diff --git a/README b/README
|
||
|
index aa7c984..ed94ede 100644
|
||
|
--- a/README
|
||
|
+++ b/README
|
||
|
@@ -228,7 +228,7 @@ EXAMPLES
|
||
|
|
||
|
$gnupg->options->hash_init( armor => 1,
|
||
|
recipients => [ 'ftobin@uiuc.edu',
|
||
|
- '0xABCD1234' ],
|
||
|
+ '0xABCD1234ABCD1234ABCD1234ABCD1234ABCD1234' ],
|
||
|
meta_interactive => 0 ,
|
||
|
);
|
||
|
|
||
|
@@ -347,7 +347,7 @@ EXAMPLES
|
||
|
# and read from our input, because no input is needed!
|
||
|
my $handles = GnuPG::Handles->new();
|
||
|
|
||
|
- my @ids = ( 'ftobin', '0xABCD1234' );
|
||
|
+ my @ids = ( 'ftobin', '0xABCD1234ABCD1234ABCD1234ABCD1234ABCD1234' );
|
||
|
|
||
|
# this time we need to specify something for
|
||
|
# command_args because --list-public-keys takes
|
||
|
@@ -358,7 +358,7 @@ EXAMPLES
|
||
|
waitpid $pid, 0;
|
||
|
|
||
|
Creating GnuPG::PublicKey Objects
|
||
|
- my @ids = [ 'ftobin', '0xABCD1234' ];
|
||
|
+ my @ids = [ 'ftobin', '0xABCD1234ABCD1234ABCD1234ABCD1234ABCD1234' ];
|
||
|
|
||
|
my @keys = $gnupg->get_public_keys( @ids );
|
||
|
|
||
|
diff --git a/lib/GnuPG/Interface.pm b/lib/GnuPG/Interface.pm
|
||
|
index cf7138f..6eaef7d 100644
|
||
|
--- a/lib/GnuPG/Interface.pm
|
||
|
+++ b/lib/GnuPG/Interface.pm
|
||
|
@@ -1130,7 +1130,7 @@ The following setup can be done before any of the following examples:
|
||
|
|
||
|
$gnupg->options->hash_init( armor => 1,
|
||
|
recipients => [ 'ftobin@uiuc.edu',
|
||
|
- '0xABCD1234' ],
|
||
|
+ '0xABCD1234ABCD1234ABCD1234ABCD1234ABCD1234' ],
|
||
|
meta_interactive => 0 ,
|
||
|
);
|
||
|
|
||
|
@@ -1253,7 +1253,7 @@ The following setup can be done before any of the following examples:
|
||
|
# and read from our input, because no input is needed!
|
||
|
my $handles = GnuPG::Handles->new();
|
||
|
|
||
|
- my @ids = ( 'ftobin', '0xABCD1234' );
|
||
|
+ my @ids = ( 'ftobin', '0xABCD1234ABCD1234ABCD1234ABCD1234ABCD1234' );
|
||
|
|
||
|
# this time we need to specify something for
|
||
|
# command_args because --list-public-keys takes
|
||
|
@@ -1265,7 +1265,7 @@ The following setup can be done before any of the following examples:
|
||
|
|
||
|
=head2 Creating GnuPG::PublicKey Objects
|
||
|
|
||
|
- my @ids = [ 'ftobin', '0xABCD1234' ];
|
||
|
+ my @ids = [ 'ftobin', '0xABCD1234ABCD1234ABCD1234ABCD1234ABCD1234' ];
|
||
|
|
||
|
my @keys = $gnupg->get_public_keys( @ids );
|
||
|
|
||
|
diff --git a/lib/GnuPG/Options.pm b/lib/GnuPG/Options.pm
|
||
|
index 86261a0..7788662 100644
|
||
|
--- a/lib/GnuPG/Options.pm
|
||
|
+++ b/lib/GnuPG/Options.pm
|
||
|
@@ -198,7 +198,7 @@ GnuPG::Options - GnuPG options embodiment
|
||
|
|
||
|
# assuming $gnupg is a GnuPG::Interface object
|
||
|
$gnupg->options->armor( 1 );
|
||
|
- $gnupg->options->push_recipients( 'ftobin', '0xABCD1234' );
|
||
|
+ $gnupg->options->push_recipients( 'ftobin', '0xABCD1234ABCD1234ABCD1234ABCD1234ABCD1234' );
|
||
|
|
||
|
=head1 DESCRIPTION
|
||
|
|
||
|
diff --git a/t/MyTestSpecific.pm b/t/MyTestSpecific.pm
|
||
|
index a309698..c8764cc 100644
|
||
|
--- a/t/MyTestSpecific.pm
|
||
|
+++ b/t/MyTestSpecific.pm
|
||
|
@@ -46,7 +46,7 @@ $gpg_is_modern = ($version[0] > 2 || ($version[0] == 2 && $version[1] >= 1));
|
||
|
$gnupg->options->hash_init( homedir => 'test/gnupghome',
|
||
|
armor => 1,
|
||
|
meta_interactive => 0,
|
||
|
- meta_signing_key_id => '0xF950DA9C',
|
||
|
+ meta_signing_key_id => '0x93AFC4B1B0288A104996B44253AE596EF950DA9C',
|
||
|
always_trust => 1,
|
||
|
);
|
||
|
|
||
|
diff --git a/t/encrypt.t b/t/encrypt.t
|
||
|
index 3183ac4..e6bdc08 100644
|
||
|
--- a/t/encrypt.t
|
||
|
+++ b/t/encrypt.t
|
||
|
@@ -27,7 +27,7 @@ TEST
|
||
|
|
||
|
$gnupg->options->clear_recipients();
|
||
|
$gnupg->options->clear_meta_recipients_keys();
|
||
|
- $gnupg->options->push_recipients( '0x2E854A6B' );
|
||
|
+ $gnupg->options->push_recipients( '0x7466B7E98C4CCB64C2CE738BADB99D9C2E854A6B' );
|
||
|
|
||
|
my $pid = $gnupg->encrypt( handles => $handles );
|
||
|
|
||
|
@@ -43,7 +43,7 @@ TEST
|
||
|
{
|
||
|
reset_handles();
|
||
|
|
||
|
- my @keys = $gnupg->get_public_keys( '0xF950DA9C' );
|
||
|
+ my @keys = $gnupg->get_public_keys( '0x93AFC4B1B0288A104996B44253AE596EF950DA9C' );
|
||
|
$gnupg->options->clear_recipients();
|
||
|
$gnupg->options->clear_meta_recipients_keys();
|
||
|
$gnupg->options->push_meta_recipients_keys( @keys );
|
||
|
@@ -64,7 +64,7 @@ TEST
|
||
|
|
||
|
$gnupg->options->clear_recipients();
|
||
|
$gnupg->options->clear_meta_recipients_keys();
|
||
|
- $gnupg->options->push_recipients( '0x2E854A6B' );
|
||
|
+ $gnupg->options->push_recipients( '0x7466B7E98C4CCB64C2CE738BADB99D9C2E854A6B' );
|
||
|
|
||
|
$handles->stdin( $texts{plain}->fh() );
|
||
|
$handles->options( 'stdin' )->{direct} = 1;
|
||
|
diff --git a/t/export_keys.t b/t/export_keys.t
|
||
|
index cf5c82b..5add064 100644
|
||
|
--- a/t/export_keys.t
|
||
|
+++ b/t/export_keys.t
|
||
|
@@ -15,7 +15,7 @@ TEST
|
||
|
reset_handles();
|
||
|
|
||
|
my $pid = $gnupg->export_keys( handles => $handles,
|
||
|
- command_args => '0xF950DA9C' );
|
||
|
+ command_args => '0x93AFC4B1B0288A104996B44253AE596EF950DA9C' );
|
||
|
close $stdin;
|
||
|
waitpid $pid, 0;
|
||
|
|
||
|
@@ -31,7 +31,7 @@ TEST
|
||
|
$handles->options( 'stdout' )->{direct} = 1;
|
||
|
|
||
|
my $pid = $gnupg->export_keys( handles => $handles,
|
||
|
- command_args => '0xF950DA9C' );
|
||
|
+ command_args => '0x93AFC4B1B0288A104996B44253AE596EF950DA9C' );
|
||
|
waitpid $pid, 0;
|
||
|
return $CHILD_ERROR == 0;
|
||
|
};
|
||
|
diff --git a/t/get_public_keys.t b/t/get_public_keys.t
|
||
|
index 9e96f7d..7893625 100644
|
||
|
--- a/t/get_public_keys.t
|
||
|
+++ b/t/get_public_keys.t
|
||
|
@@ -19,7 +19,7 @@ TEST
|
||
|
{
|
||
|
reset_handles();
|
||
|
|
||
|
- my @returned_keys = $gnupg->get_public_keys_with_sigs( '0xF950DA9C' );
|
||
|
+ my @returned_keys = $gnupg->get_public_keys_with_sigs( '0x93AFC4B1B0288A104996B44253AE596EF950DA9C' );
|
||
|
|
||
|
return 0 unless @returned_keys == 1;
|
||
|
|
||
|
diff --git a/t/get_secret_keys.t b/t/get_secret_keys.t
|
||
|
index c798cce..a7f1348 100644
|
||
|
--- a/t/get_secret_keys.t
|
||
|
+++ b/t/get_secret_keys.t
|
||
|
@@ -18,7 +18,7 @@ TEST
|
||
|
{
|
||
|
reset_handles();
|
||
|
|
||
|
- my @returned_keys = $gnupg->get_secret_keys( '0xF950DA9C' );
|
||
|
+ my @returned_keys = $gnupg->get_secret_keys( '0x93AFC4B1B0288A104996B44253AE596EF950DA9C' );
|
||
|
|
||
|
return 0 unless @returned_keys == 1;
|
||
|
|
||
|
diff --git a/t/list_public_keys.t b/t/list_public_keys.t
|
||
|
index a36a78b..622b092 100644
|
||
|
--- a/t/list_public_keys.t
|
||
|
+++ b/t/list_public_keys.t
|
||
|
@@ -38,7 +38,7 @@ TEST
|
||
|
reset_handles();
|
||
|
|
||
|
my $pid = $gnupg->list_public_keys( handles => $handles,
|
||
|
- command_args => '0xF950DA9C'
|
||
|
+ command_args => '0x93AFC4B1B0288A104996B44253AE596EF950DA9C'
|
||
|
);
|
||
|
close $stdin;
|
||
|
|
||
|
@@ -64,7 +64,7 @@ TEST
|
||
|
$handles->options( 'stdout' )->{direct} = 1;
|
||
|
|
||
|
my $pid = $gnupg->list_public_keys( handles => $handles,
|
||
|
- command_args => '0xF950DA9C',
|
||
|
+ command_args => '0x93AFC4B1B0288A104996B44253AE596EF950DA9C',
|
||
|
);
|
||
|
|
||
|
waitpid $pid, 0;
|
||
|
diff --git a/t/list_secret_keys.t b/t/list_secret_keys.t
|
||
|
index 51e3651..7040c38 100644
|
||
|
--- a/t/list_secret_keys.t
|
||
|
+++ b/t/list_secret_keys.t
|
||
|
@@ -55,7 +55,7 @@ TEST
|
||
|
reset_handles();
|
||
|
|
||
|
my $pid = $gnupg->list_secret_keys( handles => $handles,
|
||
|
- command_args => '0xF950DA9C' );
|
||
|
+ command_args => '0x93AFC4B1B0288A104996B44253AE596EF950DA9C' );
|
||
|
close $stdin;
|
||
|
|
||
|
$outfile = 'test/secret-keys/2.out';
|
||
|
@@ -80,7 +80,7 @@ TEST
|
||
|
$handles->options( 'stdout' )->{direct} = 1;
|
||
|
|
||
|
my $pid = $gnupg->list_secret_keys( handles => $handles,
|
||
|
- command_args => '0xF950DA9C' );
|
||
|
+ command_args => '0x93AFC4B1B0288A104996B44253AE596EF950DA9C' );
|
||
|
|
||
|
waitpid $pid, 0;
|
||
|
|
||
|
diff --git a/t/list_sigs.t b/t/list_sigs.t
|
||
|
index 16cfa6a..1301fb2 100644
|
||
|
--- a/t/list_sigs.t
|
||
|
+++ b/t/list_sigs.t
|
||
|
@@ -36,7 +36,7 @@ TEST
|
||
|
reset_handles();
|
||
|
|
||
|
my $pid = $gnupg->list_sigs( handles => $handles,
|
||
|
- command_args => '0xF950DA9C',
|
||
|
+ command_args => '0x93AFC4B1B0288A104996B44253AE596EF950DA9C',
|
||
|
);
|
||
|
close $stdin;
|
||
|
|
||
|
@@ -60,7 +60,7 @@ TEST
|
||
|
$handles->options( 'stdout' )->{direct} = 1;
|
||
|
|
||
|
my $pid = $gnupg->list_sigs( handles => $handles,
|
||
|
- command_args => '0xF950DA9C',
|
||
|
+ command_args => '0x93AFC4B1B0288A104996B44253AE596EF950DA9C',
|
||
|
);
|
||
|
|
||
|
waitpid $pid, 0;
|
||
|
diff --git a/t/sign_and_encrypt.t b/t/sign_and_encrypt.t
|
||
|
index 5dc1c08..df0fc75 100644
|
||
|
--- a/t/sign_and_encrypt.t
|
||
|
+++ b/t/sign_and_encrypt.t
|
||
|
@@ -14,7 +14,7 @@ TEST
|
||
|
{
|
||
|
reset_handles();
|
||
|
|
||
|
- $gnupg->options->push_recipients( '0x2E854A6B' );
|
||
|
+ $gnupg->options->push_recipients( '0x7466B7E98C4CCB64C2CE738BADB99D9C2E854A6B' );
|
||
|
my $pid = $gnupg->sign_and_encrypt( handles => $handles );
|
||
|
|
||
|
print $stdin @{ $texts{plain}->data() };
|