[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ITP GnuPG::Interface



Hi Brian!

On Wed, 18 Oct 2000, Brian May wrote:

> Are you still packaging this perl library for Debian? I found your ITP
> at <URL:http://lists.debian.org/debian-devel-0008/msg01106.html>, but
> no sign of progress.
> 
> If so, what is its status, and what is the package name?

Package: libgnupg-interface-perl
Version: 0.11-3
Priority: optional
Section: non-US
Maintainer: Peter Palfrader <ppalfrad@cosy.sbg.ac.at>
Depends: perl5, libclass-methodmaker-perl, gnupg
Architecture: all
Filename: dists/unstable/non-US/main/binary-i386/libgnupg-interface-perl_0.11-3.deb
Size: 59950
MD5sum: b735b6d1f0803917a51bfb203229022e
Description: Perl interface to GnuPG
 GnuPG::Interface and it's associated modules are designed
 to provide an object-oriented method for interacting with
 GnuPG, being able to perform functions such as but not
 limited to encrypting, signing, decryption, verification,
 and key-listing parsing.


I hope the wnpp[0] bug[1] got closed by the initial upload
*checks =debian.bugs* - yupp

On Sat, 09 Sep 2000, Debian Bug Tracking System wrote:

| Your message dated Sat, 09 Sep 2000 20:52:16 +0200
| with message-id <E13Xpjc-0007Zz-00@pandora.debian.org>
| and subject line Bug#69479: fixed in libgnupg-interface-perl 0.11-1
| has caused the attached Bug report to be marked as done.
[...]


> I started to package GnuPG.pm, but was told that this interface is
> better.

I don't know wheter it's better, it's what I use and I had a talk with a
few friends and they felt it should go into Debian.

GnuPG::Interface does not (to my knowledge) use the coprocessor hooks
offered by GnuPG. As you stated, the other perl module you packaged
does. 


On Wed, 18 Oct 2000, Brian May wrote:

>     my $gpg = new GnuPG(trace => 0,
>       homedir => "/root/.gnupg");
>     my $ret = $gpg->verify( signature => $tmp_signature, file => $tmp_file );

I like its shortness.

>     print "AAAAAAAAAAAAAAA\n";
>     print $datafile $file_contents;

You should close the input filehandle, then it should work
(I've not tested it).

>     print "BBBBBBBBBBBBBBB\n";
[...]

I usually use this code snippet:

------------------------------
#!/usr/bin/perl -w

use strict;

use GnuPG::Interface;
use IO::Handle;


$/ = undef;
my $input = <>;


        my $gnupg = GnuPG::Interface->new();
        # $gnupg->options->hash_init(
        #         'always_trust'  => 1,
        # );

        $gnupg->options->meta_interactive( 0 );

        my ( $input_fh, $output_fh, $error_fh, $status_fh ) = (
                IO::Handle->new(),
                IO::Handle->new(),
                IO::Handle->new(),
                IO::Handle->new() );

        my $handles = GnuPG::Handles->new(
                stdin   => $input_fh,
                stdout  => $output_fh,
                stderr  => $error_fh,
                status  => $status_fh );

        $gnupg->verify( handles => $handles );

        print $input_fh $input;
        close $input_fh;

        my ($output, $error_output, $status_info);
        {
                local $/ = undef;
                $output = <$output_fh>;
                $error_output = <$error_fh>;
                $status_info = <$status_fh>;
        };

        wait; # clean up the finished GnuPG process

	print "exit code: $?\nstdout:\n$output\nstderr:\n$error_output\nstatus_info:\n$status_info\n";
------------------------------

I probably should also close the other 3 filehandles.


The output for a valid sig then is:

| exit code: 0
| stdout:
| 
| stderr:
| gpg: Signature made Sun Sep 24 00:49:46 2000 CEST using DSA key ID 94C09C7F
| gpg: Good signature from "Peter Palfrader"
| gpg:                 aka "Peter Palfrader <palfrader@writeme.com>"
| gpg:                 aka "Peter Palfrader <ppalfrad@cosy.sbg.ac.at>"
| gpg:                 aka "Weasel <weasel@netalive.org>"
| gpg:                 aka "Peter Palfrader <peter@palfrader.org>"
| gpg:                 aka "Weasel <weasel@netalive>"
| 
| status_info:
| [GNUPG:] SIG_ID BL4RC+F6gl3OIecFw4+AkKHoZ5Y 2000-09-23 969749386
| [GNUPG:] GOODSIG DE7AAF6E94C09C7F Peter Palfrader
| [GNUPG:] VALIDSIG 5B00C96D5D54AEE1206BAF84DE7AAF6E94C09C7F 2000-09-23 969749386
| [GNUPG:] TRUST_ULTIMATE
| 

and for a br0ken one:

| exit code: 256
| stdout:
| 
| stderr:
| gpg: Signature made Wed Oct 18 18:46:52 2000 CEST using DSA key ID 94C09C7F
| gpg: BAD signature from "Peter Palfrader"
| 
| status_info:
| [GNUPG:] BADSIG DE7AAF6E94C09C7F Peter Palfrader
| 


HTH
					you,
					peter

 0. http://bugs.debian.org/wnpp
 1. http://bugs.debian.org/69479

-- 
PGP encrypted messages preferred.
http://www.cosy.sbg.ac.at/~ppalfrad/
[please CC me on lists]

Attachment: pgplzjeVmI12A.pgp
Description: PGP signature


Reply to: