The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NOM

Slackware::Slackget::GPG - A simple wrapper class to the gpg binary

VERSION

Version 0.4

SYNOPSIS

A simple class to verify files signatures with gpg.

    use Slackware::Slackget::GPG;

    my $slackware_slackget_gpg_object = Slackware::Slackget::GPG->new();

CONSTRUCTOR

new() : The constructor take the followings arguments :

        - gpg_binary : where we can find a valid gpg binary (default: /usr/bin/gpg)

METHODS

verify_file

take a file and a signature as parameter and verify the signature of the file. Return a Slackware::Slackget::GPG::Signature object. If the status is UNKNOW, the warnings() accessor may return some interesting data.

        my $sig = $gpg->verify("/usr/local/slack-get-1.0.0-alpha1/update/signature-cache/gcc-g++-3.3.4-i486-1.tgz","/usr/local/slack-get-1.0.0-alpha1/update/package-cache/gcc-g++-3.3.4-i486-1.tgz.asc");
        die "Signature doesn't match.\n" if(!$sig->is_good) ;

import_key

Import a key file passed in parameter.

        $gpg->import_key('update/GPG-KEY') or die "unable to import official Slackware GnuPG key.\n";

Return a Slackware::Slackget::Signature object.

The returned object is set with the status (which represent in this case, the status of the import).

On successfull import, it also set teh key_id and the emitter.

in_keyring

Return the number of keys in the keyring that match the given string.

    $gpg->in_keyring('Slackware Linux Project') or die "The GPG signature of the Slackware Linux project cannot be found in your keyring.\n";

list_keys

Return the list of keys in the current user's keyring.

list_sigs

Return the list of signatures in the current user's keyring.

ACCESSORS

gpg_binary

Get/set the path to the gpg binary.

        die "Cannot find gpg : $!\n" unless( -e $gpg->gpg_binary());

AUTHOR

DUPUIS Arnaud, <a.dupuis@infinityperl.org>

BUGS

Please report any bugs or feature requests to bug-Slackware-Slackget@rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Slackware-Slackget. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Slackware::Slackget

You can also look for information at:

ACKNOWLEDGEMENTS

Thanks to Bertrand Dupuis (yes my brother) for his contribution to the documentation.

SEE ALSO

COPYRIGHT & LICENSE

Copyright 2005 DUPUIS Arnaud, All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.