mirror of
https://github.com/moparisthebest/gpgit
synced 2024-08-13 15:53:50 -04:00
Add X-Gpgit-Execute header to all messages encrypted with gpgit, so that it is easier to tell which messages have been sent encrypted and which messages were merely encrypted by gpgit
This commit is contained in:
parent
859edbe85d
commit
a5816ef60e
3
gpgit
3
gpgit
@ -124,7 +124,7 @@ use MIME::Parser;
|
|||||||
|
|
||||||
## Keep the new message if it was succesfully flattened
|
## Keep the new message if it was succesfully flattened
|
||||||
if( $new_mime->mime_type !~ /^multipart\// ){
|
if( $new_mime->mime_type !~ /^multipart\// ){
|
||||||
$new_mime->head->add('X-GPGIT-Flattened-From', $orig_mime_structure );
|
$new_mime->head->add('X-Gpgit-Flattened-From', $orig_mime_structure );
|
||||||
$mime = $new_mime;
|
$mime = $new_mime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -134,6 +134,7 @@ use MIME::Parser;
|
|||||||
## Encrypt
|
## Encrypt
|
||||||
{
|
{
|
||||||
my $code;
|
my $code;
|
||||||
|
$mime->head->add('X-Gpgit-Executed', 'True' );
|
||||||
if( $encrypt_mode eq 'pgpmime' ){
|
if( $encrypt_mode eq 'pgpmime' ){
|
||||||
$code = $gpg->mime_encrypt( $mime, @recipients );
|
$code = $gpg->mime_encrypt( $mime, @recipients );
|
||||||
} elsif( $encrypt_mode eq 'prefer-inline' ){
|
} elsif( $encrypt_mode eq 'prefer-inline' ){
|
||||||
|
Loading…
Reference in New Issue
Block a user