Slackware::Slackget::GPG::Signature - A simple class to represent an output of gpg signature verification.


Slackware-Slackget documentation Contained in the Slackware-Slackget distribution.

Index


Code Index:

NAME

Top

Slackware::Slackget::GPG::Signature - A simple class to represent an output of gpg signature verification.

VERSION

Top

Version 0.5

SYNOPSIS

Top

A simple class to represent an output of gpg signature verification. This class parse the output of the 'gpg' command line tool.

    use Slackware::Slackget::GPG::Signature;

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

CONSTRUCTOR

Top

new() : The constructor take the followings arguments :

	- key_id : the id of the key which have been use to sign the file

	- warnings : an array reference which contains all 

	- status : GOOD, BAD or UNKNOW the status of the verification

	- date : date the signature was made

	- emitter : the signature emitter.

	- fingerprint : the primary key fingerprint.







METHODS

Top

is_good

True if the signature is good, false otherwise.

ACCESSORS

Top

key_id

Accessor for the key_id constructor's parameter. Return a scalar.

warnings

Accessor for the warnings constructor's parameter. Return a hashref.

status

Accessor for the status constructor's parameter. Return a scalar.

date

Accessor for the date constructor's parameter. Return a scalar.

emitter

Accessor for the emitter constructor's parameter. Return a scalar.

fingerprint

Accessor for the fingerprint constructor's parameter. Return a scalar.

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::GPG::Signature




You can also look for information at:

* Infinity Perl website

http://www.infinityperl.org

* 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 Contained in the Slackware-Slackget distribution.
package Slackware::Slackget::GPG::Signature;

use warnings;
use strict;

our $VERSION = '0.5';

sub new
{
	my ($class,%args) = @_ ;
	my $self={};
	$self->{DATA}->{key_id} = undef ;
	$self->{DATA}->{key_id} = $args{key_id} if(exists($args{key_id}) && defined($args{key_id})); 
	$self->{DATA}->{'warnings'} = [] ;
	$self->{DATA}->{'warnings'} = $args{warnings} if(exists($args{warnings}) && defined($args{warnings}));
	$self->{DATA}->{status} = undef ;
	$self->{DATA}->{status} = $args{status} if(exists($args{status}) && defined($args{status}));
	$self->{DATA}->{date} = undef ;
	$self->{DATA}->{date} = $args{date} if(exists($args{date}) && defined($args{date}));
	$self->{DATA}->{emitter} = undef ;
	$self->{DATA}->{emitter} = $args{emitter} if(exists($args{emitter}) && defined($args{emitter}));
	$self->{DATA}->{fingerprint} = undef ;
	$self->{DATA}->{fingerprint} = $args{fingerprint} if(exists($args{fingerprint}) && defined($args{fingerprint}));
	bless($self,$class);
	return $self;
}

sub is_good
{
	my ($self) = @_;
	return ($self->{DATA}->{status} eq 'GOOD') ? 1 : 0 ;
}



sub key_id
{
	return $_[1] ? $_[0]->{DATA}->{key_id}=$_[1] : $_[0]->{DATA}->{key_id};
}

sub warnings
{
	return $_[1] ? $_[0]->{DATA}->{'warnings'}=$_[1] : $_[0]->{DATA}->{'warnings'};
}

sub status
{
	return $_[1] ? $_[0]->{DATA}->{status}=$_[1] : $_[0]->{DATA}->{status};
}

sub date
{
	return $_[1] ? $_[0]->{DATA}->{date}=$_[1] : $_[0]->{DATA}->{date};
}

sub emitter
{
	return $_[1] ? $_[0]->{DATA}->{emitter}=$_[1] : $_[0]->{DATA}->{emitter};
}

sub fingerprint
{
	return $_[1] ? $_[0]->{DATA}->{fingerprint}=$_[1] : $_[0]->{DATA}->{fingerprint};
}



1; # Fin de Slackware::Slackget::GPG::Signature