r5803 - in /packages/libmail-gnupg-perl/trunk: Changes GnuPG.pm META.yml debian/changelog t/round-trip.t
gregoa-guest at users.alioth.debian.org
gregoa-guest at users.alioth.debian.org
Sat Jul 14 22:28:12 UTC 2007
Author: gregoa-guest
Date: Sat Jul 14 22:28:12 2007
New Revision: 5803
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=5803
Log:
* New upstream release.
Modified:
packages/libmail-gnupg-perl/trunk/Changes
packages/libmail-gnupg-perl/trunk/GnuPG.pm
packages/libmail-gnupg-perl/trunk/META.yml
packages/libmail-gnupg-perl/trunk/debian/changelog
packages/libmail-gnupg-perl/trunk/t/round-trip.t
Modified: packages/libmail-gnupg-perl/trunk/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libmail-gnupg-perl/trunk/Changes?rev=5803&op=diff
==============================================================================
--- packages/libmail-gnupg-perl/trunk/Changes (original)
+++ packages/libmail-gnupg-perl/trunk/Changes Sat Jul 14 22:28:12 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/trunk/GnuPG.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libmail-gnupg-perl/trunk/GnuPG.pm?rev=5803&op=diff
==============================================================================
--- packages/libmail-gnupg-perl/trunk/GnuPG.pm (original)
+++ packages/libmail-gnupg-perl/trunk/GnuPG.pm Sat Jul 14 22:28:12 2007
@@ -21,7 +21,7 @@
use strict;
use warnings;
-our $VERSION = '0.08';
+our $VERSION = '0.10';
use GnuPG::Interface;
use File::Spec;
@@ -191,8 +191,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;
@@ -304,7 +309,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;
@@ -453,7 +463,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];
@@ -463,6 +476,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);
@@ -544,7 +558,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);
@@ -570,7 +584,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;
@@ -586,8 +599,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();
@@ -604,8 +617,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;
@@ -617,6 +634,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;
}
@@ -679,8 +701,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";
@@ -782,7 +807,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];
@@ -844,7 +873,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);
@@ -907,7 +936,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/trunk/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libmail-gnupg-perl/trunk/META.yml?rev=5803&op=diff
==============================================================================
--- packages/libmail-gnupg-perl/trunk/META.yml (original)
+++ packages/libmail-gnupg-perl/trunk/META.yml Sat Jul 14 22:28:12 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/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libmail-gnupg-perl/trunk/debian/changelog?rev=5803&op=diff
==============================================================================
--- packages/libmail-gnupg-perl/trunk/debian/changelog (original)
+++ packages/libmail-gnupg-perl/trunk/debian/changelog Sat Jul 14 22:28:12 2007
@@ -1,3 +1,9 @@
+libmail-gnupg-perl (0.10-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- gregor herrmann <gregor+debian at comodo.priv.at> Sun, 15 Jul 2007 00:23:19 +0200
+
libmail-gnupg-perl (0.08-3) unstable; urgency=low
* Document how MIME-encoded signatures should be verified.
Modified: packages/libmail-gnupg-perl/trunk/t/round-trip.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libmail-gnupg-perl/trunk/t/round-trip.t?rev=5803&op=diff
==============================================================================
--- packages/libmail-gnupg-perl/trunk/t/round-trip.t (original)
+++ packages/libmail-gnupg-perl/trunk/t/round-trip.t Sat Jul 14 22:28:12 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