--- GPG.pm
+++ GPG.pm
@@ -60,9 +58,6 @@
sub sign {
my $self = shift;
- return unless $self->{SECRETKEY} =~ /$self->{VKEYID}/
- and $self->{PASSPHRASE} =~ /$self->{VPASSPHRASE}/;
-
my $detach = '-b' if $self->detach;
my $armor = '-a' if $self->armor;
my @extras = grep { $_ } ($detach, $armor);
@@ -132,9 +125,6 @@
my $self = shift;
my ($tmpfh3, $tmpnam3);
- return unless $self->{SECRETKEY} || $_[1];
- return unless $self->{PASSPHRASE} =~ /$self->{VPASSPHRASE}/;
-
my ($tf, $ts, $td) = ($self->{TMPFILES}, $self->{TMPSUFFIX}, $self->{TMPDIR});
my ($tmpfh, $tmpnam) = tempfile ($tf, DIR => $td, SUFFIX => $ts, UNLINK => 0);
my ($tmpfh2, $tmpnam2) = tempfile ($tf, DIR => $td, SUFFIX => $ts, UNLINK => 1);
@@ -184,8 +172,7 @@
last;
}
elsif ($2) {
- if ($2 eq $seckey) {
- $in .= "$self->{PASSPHRASE}\n";
+ $in .= $self->{PASSPHRASE} . "\n";
pump $h until $out =~ /(GOOD|BAD)_PASSPHRASE/g;
if ($1 eq 'GOOD') {
$success = 1;
@@ -193,10 +180,6 @@
finish $h; $x = $out; last;
}
next;
- }
- else {
- $out = ''; $in .= "\n";
- }
}
elsif ($1) {
$success = 1;
@@ -265,11 +247,6 @@
my $sign = $_[2] && $_[2] eq '-sign' ? '--sign' : '';
my $armor = $self->{ARMOR} ? '-a' : '';
- if ($sign) {
- return unless $self->{SECRETKEY} =~ /$self->{VKEYID}/
- and $self->{PASSPHRASE} =~ /$self->{VPASSPHRASE}/;
- }
-
my @rcpts;
if (ref($rcpts) eq 'ARRAY') {
@rcpts = map {