File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
1
package Module::Signature ;
2
- $Module::Signature::VERSION = ' 0.73 ' ;
2
+ $Module::Signature::VERSION = ' 0.73_01 ' ;
3
3
4
4
use 5.005;
5
5
use strict;
6
6
use vars qw( $VERSION $SIGNATURE @ISA @EXPORT_OK) ;
7
- use vars qw( $Preamble $Cipher $Debug $Verbose $Timeout) ;
7
+ use vars qw( $Preamble $Cipher $Debug $Verbose $Timeout $AUTHOR ) ;
8
8
use vars qw( $KeyServer $KeyServerPort $AutoKeyRetrieve $CanKeyRetrieve) ;
9
9
10
10
use constant CANNOT_VERIFY => ' 0E0' ;
@@ -27,6 +27,7 @@ use File::Spec;
27
27
);
28
28
@ISA = ' Exporter' ;
29
29
30
+ $AUTHOR = $ENV {MODULE_SIGNATURE_AUTHOR };
30
31
$SIGNATURE = ' SIGNATURE' ;
31
32
$Timeout = $ENV {MODULE_SIGNATURE_TIMEOUT } || 3;
32
33
$Verbose = $ENV {MODULE_SIGNATURE_VERBOSE } || 0;
@@ -400,7 +401,9 @@ sub _sign_gpg {
400
401
my $gpg = _which_gpg();
401
402
402
403
local *D;
403
- open D, " | $gpg --clearsign >> $sigfile .tmp" or die " Could not call $gpg : $! " ;
404
+ my $set_key = ' ' ;
405
+ $set_key = " --default-key $AUTHOR " if ($AUTHOR );
406
+ open D, " | $gpg $set_key --clearsign >> $sigfile .tmp" or die " Could not call $gpg : $! " ;
404
407
print D $plaintext ;
405
408
close D;
406
409
You can’t perform that action at this time.
0 commit comments