| Slackware-Slackget documentation | Contained in the Slackware-Slackget distribution. |
Slackware::Slackget::GPG::Signature - A simple class to represent an output of gpg signature verification.
Version 0.5
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();
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.
True if the signature is good, false otherwise.
Accessor for the key_id constructor's parameter. Return a scalar.
Accessor for the warnings constructor's parameter. Return a hashref.
Accessor for the status constructor's parameter. Return a scalar.
Accessor for the date constructor's parameter. Return a scalar.
Accessor for the emitter constructor's parameter. Return a scalar.
Accessor for the fingerprint constructor's parameter. Return a scalar.
DUPUIS Arnaud, <a.dupuis@infinityperl.org>
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.
You can find documentation for this module with the perldoc command.
perldoc Slackware::Slackget::GPG::Signature
You can also look for information at:
Thanks to Bertrand Dupuis (yes my brother) for his contribution to the documentation.
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.
| 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