r5801 - in /packages/libmail-gnupg-perl/branches/upstream/current: Changes GnuPG.pm META.yml t/round-trip.t
gregoa-guest at users.alioth.debian.org
gregoa-guest at users.alioth.debian.org
Sat Jul 14 22:22:59 UTC 2007
Author: gregoa-guest
Date: Sat Jul 14 22:22:59 2007
New Revision: 5801
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=5801
Log:
[svn-upgrade] Integrating new upstream version, libmail-gnupg-perl (0.10)
Modified:
packages/libmail-gnupg-perl/branches/upstream/current/Changes
packages/libmail-gnupg-perl/branches/upstream/current/GnuPG.pm
packages/libmail-gnupg-perl/branches/upstream/current/META.yml
packages/libmail-gnupg-perl/branches/upstream/current/t/round-trip.t
Modified: packages/libmail-gnupg-perl/branches/upstream/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libmail-gnupg-perl/branches/upstream/current/Changes?rev=5801&op=diff
==============================================================================
--- packages/libmail-gnupg-perl/branches/upstream/current/Changes (original)
+++ packages/libmail-gnupg-perl/branches/upstream/current/Changes Sat Jul 14 22:22:59 2007
@@ -1,4 +1,13 @@
Revision history for Perl extension Mail::GnuPG.
+
+0.10 Mon Jul 9 15:12:10 PDT 2007
+
+ - Fixed "-1" result code from waitpid handling. (On OSX, it can mean 'reaped' not actually an error)
+
+0.09
+
+ - MIME content type of signed portion will be same as content type
+ of original message.
0.08 Sat Jul 17 19:11:06 PDT 2004
@@ -28,7 +37,7 @@
0.06 Wed Jul 23 19:59:51 PDT 2003
- (From Jörn Reder)
+ (From Jörn Reder)
- bugfix in decrypt(): with ASCII armor messages the first line of
the cleartext was removed by MIME::Parser, if the cleartext was no
entity but simple ASCII text.
@@ -40,7 +49,7 @@
0.05 Thu Jun 12 23:05:48 PDT 2003
- (From Jörn Reder)
+ (From Jörn Reder)
- insecure temp file handling (still insecure, but not that much ;)
- non portable temp directory handling
- insecure temp file / MIME::Parser handling in decrypt()
Modified: packages/libmail-gnupg-perl/branches/upstream/current/GnuPG.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libmail-gnupg-perl/branches/upstream/current/GnuPG.pm?rev=5801&op=diff
==============================================================================
--- packages/libmail-gnupg-perl/branches/upstream/current/GnuPG.pm (original)
+++ packages/libmail-gnupg-perl/branches/upstream/current/GnuPG.pm Sat Jul 14 22:22:59 2007
@@ -21,7 +21,7 @@
use strict;
use warnings;
-our $VERSION = '0.08';
+our $VERSION = '0.10';
use GnuPG::Interface;
use File::Spec;
@@ -181,8 +181,13 @@
close $error;
close $status_fh;
- waitpid $pid, 0; # clean up the finished GnuPG process
- my $exit_value = $? >> 8;
+ waitpid $pid, 0;
+ my $return = $?;
+ $return = 0 if $return == -1;
+
+ my $exit_value = $return >> 8;
+
+
$self->{last_message} = \@error_output;
$self->{plaintext} = \@plaintext;
@@ -294,7 +299,12 @@
# clean up the finished GnuPG process
waitpid $pid, 0;
- my $exit_value = $? >> 8;
+ my $return = $?;
+ $return = 0 if $return == -1;
+
+ my $exit_value = $return >> 8;
+
+
# set last_message
$self->{last_message} = \@result;
@@ -437,7 +447,10 @@
unlink $sigfile, $datafile;
waitpid $pid, 0;
- my $exit_value = $? >> 8;
+ my $return = $?;
+ $return = 0 if $return == -1;
+
+ my $exit_value = $return >> 8;
$self->{last_message} = [@result];
@@ -447,6 +460,7 @@
my $result = join "", @result;
my ($keyid) = $result =~ /using \S+ key ID (.+)$/m;
my ($pemail) = $result =~ /Good signature from "(.+)"$/m;
+
return ($exit_value,$keyid,$pemail);
@@ -528,7 +542,7 @@
$entity->make_multipart;
my $workingentity = $entity;
if ($entity->parts > 1) {
- $workingentity = MIME::Entity->build(Type => "multipart/mixed");
+ $workingentity = MIME::Entity->build(Type => $entity->head->mime_attr("Content-Type"));
$workingentity->add_part($_) for ($entity->parts);
$entity->parts([]);
$entity->add_part($workingentity);
@@ -554,7 +568,6 @@
# this passes in the plaintext
my $plaintext;
if ($workingentity eq $entity) {
-# $RT::Logger->crit("SINGLEPART");
$plaintext = $entity->parts(0)->as_string;
} else {
$plaintext = $workingentity->as_string;
@@ -570,8 +583,8 @@
# DEBUG:
# print "SIGNING THIS STRING ----->\n";
# $plaintext =~ s/\n/-\n/gs;
-# $RT::Logger->crit("SIGNING:\n$plaintext<<<");
-# $RT::Logger->crit($entity->as_string);
+# warn("SIGNING:\n$plaintext<<<");
+# warn($entity->as_string);
# print STDERR $plaintext;
# print "<----\n";
$input->flush();
@@ -588,8 +601,12 @@
close $error;
close $status_fh;
- waitpid $pid, 0; # clean up the finished GnuPG process
- my $exit_value = $? >> 8;
+ waitpid $pid, 0;
+ my $return = $?;
+ $return = 0 if $return == -1;
+
+ my $exit_value = $return >> 8;
+
$self->{last_message} = \@error_output;
@@ -601,6 +618,11 @@
$entity->head->mime_attr("Content-Type","multipart/signed");
$entity->head->mime_attr("Content-Type.protocol","application/pgp-signature");
# $entity->head->mime_attr("Content-Type.micalg","pgp-md5");
+# Richard Hirner notes that Thunderbird/Enigmail really wants a micalg
+# of pgp-sha1 (which will be GPG version dependent.. older versions
+# used md5. For now, until we can detect which type was used, the end
+# user should read the source code, notice this comment, and insert
+# the appropriate value themselves.
return $exit_value;
}
@@ -663,8 +685,11 @@
close $error;
waitpid $pid, 0;
- my $exit_value = $? >> 8;
-
+ my $return = $?;
+ $return = 0 if $return == -1;
+
+ my $exit_value = $return >> 8;
+
$self->{last_message} = [@error_output];
my $io = $body->open ("w") or die "can't open entity body";
@@ -766,7 +791,11 @@
close $error;
waitpid $pid, 0;
- my $exit_value = $? >> 8;
+ my $return = $?;
+ $return = 0 if $return == -1;
+
+ my $exit_value = $return >> 8;
+
$self->{last_message} = [@error_output];
@@ -828,7 +857,7 @@
my $workingentity = $entity;
$entity->make_multipart;
if ($entity->parts > 1) {
- $workingentity = MIME::Entity->build(Type => "multipart/mixed");
+ $workingentity = MIME::Entity->build(Type => $entity->head->mime_attr("Content-Type"));
$workingentity->add_part($_) for ($entity->parts);
$entity->parts([]);
$entity->add_part($workingentity);
@@ -891,7 +920,14 @@
close $status_fh;
waitpid $pid, 0;
- my $exit_value = $? >> 8;
+ my $return = $?;
+ $return = 0 if $return == -1;
+
+ my $exit_value = $return >> 8;
+
+
+
+
$self->{last_message} = [@error_output];
Modified: packages/libmail-gnupg-perl/branches/upstream/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libmail-gnupg-perl/branches/upstream/current/META.yml?rev=5801&op=diff
==============================================================================
--- packages/libmail-gnupg-perl/branches/upstream/current/META.yml (original)
+++ packages/libmail-gnupg-perl/branches/upstream/current/META.yml Sat Jul 14 22:22:59 2007
@@ -1,10 +1,11 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
-name: Mail-GnuPG
-version: 0.08
-version_from: GnuPG.pm
-installdirs: site
-requires:
+--- #YAML:1.0
+name: Mail-GnuPG
+version: 0.10
+abstract: Process email with GPG.
+license: ~
+generated_by: ExtUtils::MakeMaker version 6.31
+distribution_type: module
+requires:
File::Spec: 0
File::Temp: 0
GnuPG::Interface: 0
@@ -13,6 +14,8 @@
MIME::Entity: 0
MIME::Parser: 0
Test::More: 0
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.21
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.2.html
+ version: 1.2
+author:
+ - Robert Spier <rspier at cpan.org>
Modified: packages/libmail-gnupg-perl/branches/upstream/current/t/round-trip.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libmail-gnupg-perl/branches/upstream/current/t/round-trip.t?rev=5801&op=diff
==============================================================================
--- packages/libmail-gnupg-perl/branches/upstream/current/t/round-trip.t (original)
+++ packages/libmail-gnupg-perl/branches/upstream/current/t/round-trip.t Sat Jul 14 22:22:59 2007
@@ -57,14 +57,14 @@
is( 0, $mg->clear_sign( $copy ) );
-my ($verify,$key,$who) = $mg->verify($copy);
+{ my ($verify,$key,$who) = $mg->verify($copy);
is( 0, $verify );
is( $KEY, $key );
is( $WHO, $who );
is( 1, $mg->is_signed($copy) );
is( 0, $mg->is_encrypted($copy) );
-
+}
# Test MIME Encryption Round Trip
# hmm.. the encryption functions don't seem to be working right.
More information about the Pkg-perl-cvs-commits
mailing list