summaryrefslogtreecommitdiff
path: root/rt/lib/RT/Crypt/GnuPG.pm
diff options
context:
space:
mode:
Diffstat (limited to 'rt/lib/RT/Crypt/GnuPG.pm')
-rw-r--r--rt/lib/RT/Crypt/GnuPG.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/rt/lib/RT/Crypt/GnuPG.pm b/rt/lib/RT/Crypt/GnuPG.pm
index d0587d4fe..03636c8c3 100644
--- a/rt/lib/RT/Crypt/GnuPG.pm
+++ b/rt/lib/RT/Crypt/GnuPG.pm
@@ -401,14 +401,15 @@ sub SignEncrypt {
my $entity = $args{'Entity'};
if ( $args{'Sign'} && !defined $args{'Signer'} ) {
+ my @addresses = Email::Address->parse( Encode::decode("UTF-8",$entity->head->get( 'From' )));
$args{'Signer'} = UseKeyForSigning()
- || (Email::Address->parse( $entity->head->get( 'From' ) ))[0]->address;
+ || $addresses[0]->address;
}
if ( $args{'Encrypt'} && !$args{'Recipients'} ) {
my %seen;
$args{'Recipients'} = [
grep $_ && !$seen{ $_ }++, map $_->address,
- map Email::Address->parse( $entity->head->get( $_ ) ),
+ map Email::Address->parse( Encode::decode("UTF-8",$entity->head->get( $_ ) ) ),
qw(To Cc Bcc)
];
}
@@ -520,7 +521,7 @@ sub SignEncryptRFC3156 {
$gnupg->options->push_recipients( $_ ) foreach
map UseKeyForEncryption($_) || $_,
grep !$seen{ $_ }++, map $_->address,
- map Email::Address->parse( $entity->head->get( $_ ) ),
+ map Email::Address->parse( Encode::decode( "UTF-8", $entity->head->get( $_ ) ) ),
qw(To Cc Bcc);
my ($tmp_fh, $tmp_fn) = File::Temp::tempfile( UNLINK => 1 );