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


Slackware-Slackget documentation  | view source Contained in the Slackware-Slackget distribution.

Index


NOM

Top

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

VERSION

Top

Version 0.4

SYNOPSIS

Top

A simple class to verify files signatures with gpg.

    use Slackware::Slackget::GPG;

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

CONSTRUCTOR

Top

new() : The constructor take the followings arguments :

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







METHODS

Top

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

Top

gpg_binary

Get/set the path to the gpg binary.

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

AUTHOR

Top

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

BUGS

Top

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

Top

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

    perldoc Slackware::Slackget




You can also look for information at:

* Infinity Perl website

http://www.infinityperl.org/category/slack-get

* slack-get specific website

http://slackget.infinityperl.org

* RT: CPAN's request tracker

http://rt.cpan.org/NoAuth/Bugs.html?Dist=Slackware-Slackget

* AnnoCPAN: Annotated CPAN documentation

http://annocpan.org/dist/Slackware-Slackget

* CPAN Ratings

http://cpanratings.perl.org/d/Slackware-Slackget

* Search CPAN

http://search.cpan.org/dist/Slackware-Slackget

ACKNOWLEDGEMENTS

Top

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

SEE ALSO

Top

COPYRIGHT & LICENSE

Top


Slackware-Slackget documentation  | view source Contained in the Slackware-Slackget distribution.