view release on metacpan or search on metacpan
version 1.1
# SYNOPSIS
```
usage: pgpfinger [-?fioq] [long options...] <uid> <more uids ...>
-? --usage --help Prints this usage information.
-f --format format of input (armored or binary)
-i --input path or - for stdin
-q --query sources to query (default: dns,keyserver,gpg,file)
-o --output output format: armored,rfc or generic (default:
armored)
```
# OPTIONS
-q --query <method,method,...> (default: keyserver)
: Select sources to query for PGP keys. Values must be comma seperated.
Currently supported: dns, keyserver, gpg, file
-o --output <format> (default: armored)
: Select format of output.
Supported formats: armored, binary, generic, rfc
-i --input <file> (default: -)
: Input used for file query method. (-q file)
Path of a file or - for reading from stdin.
-f --format <format> (default: armored)
: Format of file input.
Supported formats: armored, binary
bin/pgpfinger view on Meta::CPAN
=head1 VERSION
version 1.1
=head1 SYNOPSIS
usage: pgpfinger [-?fioq] [long options...] <uid> <more uids ...>
-? --usage --help Prints this usage information.
-f --format format of input (armored or binary)
-i --input path or - for stdin
-q --query sources to query (default: dns,keyserver,gpg,file)
-o --output output format: armored,rfc or generic (default:
armored)
=head1 OPTIONS
=over
=item -q --query <method,method,...> (default: keyserver)
Select sources to query for PGP keys. Values must be comma seperated.
Currently supported: dns, keyserver, gpg, file
=item -o --output <format> (default: armored)
Select format of output.
Supported formats: armored, binary, generic, rfc
=item -i --input <file> (default: -)
Input used for file query method. (-q file)
lib/PGP/Finger/App.pm view on Meta::CPAN
default => sub {
my $self = shift;
my @srcs;
foreach my $q ( @{$self->_query} ) {
my $src;
$q = lc($q);
if( $q eq 'dns' ) {
$src = PGP::Finger::DNS->new();
} elsif( $q eq 'keyserver' ) {
$src = PGP::Finger::Keyserver->new();
} elsif( $q eq 'gpg' ) {
$src = PGP::Finger::GPG->new();
} elsif( $q eq 'file' ) {
$src = PGP::Finger::File->new(
input => $self->input,
format => $self->format,
);
} else {
die('unknown query type: '.$q);
}
push( @srcs, $src );
lib/PGP/Finger/DNS.pm view on Meta::CPAN
package PGP::Finger::DNS;
use Moose;
extends 'PGP::Finger::Source';
# ABSTRACT: gpgfinger source to query DNS for OPENPGPKEYs
our $VERSION = '1.1'; # VERSION
use Net::DNS::Resolver;
use Digest::SHA qw(sha224_hex);
use PGP::Finger::Result;
use PGP::Finger::Key;
has 'dnssec' => ( is => 'rw', isa => 'Bool', default => 1 );
lib/PGP/Finger/DNS.pm view on Meta::CPAN
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
PGP::Finger::DNS - gpgfinger source to query DNS for OPENPGPKEYs
=head1 VERSION
version 1.1
=head1 AUTHOR
Markus Benning <ich@markusbenning.de>
=head1 COPYRIGHT AND LICENSE
lib/PGP/Finger/File.pm view on Meta::CPAN
package PGP::Finger::File;
use Moose;
extends 'PGP::Finger::Source';
# ABSTRACT: gpgfinger source for local file input
our $VERSION = '1.1'; # VERSION
use PGP::Finger::Result;
use PGP::Finger::Key;
use IO::File;
use IO::Handle;
has 'input' => ( is => 'ro', isa => 'Str', required => 1 );
lib/PGP/Finger/File.pm view on Meta::CPAN
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
PGP::Finger::File - gpgfinger source for local file input
=head1 VERSION
version 1.1
=head1 AUTHOR
Markus Benning <ich@markusbenning.de>
=head1 COPYRIGHT AND LICENSE
lib/PGP/Finger/GPG.pm view on Meta::CPAN
package PGP::Finger::GPG;
use Moose;
extends 'PGP::Finger::Source';
# ABSTRACT: gpgfinger source to query local gnupg
our $VERSION = '1.1'; # VERSION
use PGP::Finger::Result;
use PGP::Finger::Key;
use IPC::Run qw(run);
has 'cmd' => ( is => 'ro', isa => 'ArrayRef', lazy => 1,
default => sub { [ '/usr/bin/gpg', '--export' ] },
);
sub fetch {
my ( $self, $addr ) = @_;
my @cmd = ( @{$self->cmd}, $addr );
my ( $in, $out, $err );
run( \@cmd, \$in, \$out, \$err )
or die('error running gpg: '.$err.' ('.$!.')');
my $result = PGP::Finger::Result->new;
my $key = PGP::Finger::Key->new(
mail => $addr,
data => $out,
);
$key->set_attr( source => 'local GnuPG' );
$result->add_key( $key );
return $result;
lib/PGP/Finger/GPG.pm view on Meta::CPAN
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
PGP::Finger::GPG - gpgfinger source to query local gnupg
=head1 VERSION
version 1.1
=head1 AUTHOR
Markus Benning <ich@markusbenning.de>
=head1 COPYRIGHT AND LICENSE
lib/PGP/Finger/Keyserver.pm view on Meta::CPAN
package PGP::Finger::Keyserver;
use Moose;
extends 'PGP::Finger::Source';
# ABSTRACT: gpgfinger source to query a keyserver
our $VERSION = '1.1'; # VERSION
use LWP::UserAgent;
use PGP::Finger::Result;
use PGP::Finger::Key;
has _agent => ( is => 'ro', isa => 'LWP::UserAgent', lazy => 1,
default => sub {
LWP::UserAgent->new;
lib/PGP/Finger/Keyserver.pm view on Meta::CPAN
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
PGP::Finger::Keyserver - gpgfinger source to query a keyserver
=head1 VERSION
version 1.1
=head1 AUTHOR
Markus Benning <ich@markusbenning.de>
=head1 COPYRIGHT AND LICENSE
lib/PGP/Finger/Result.pm view on Meta::CPAN
package PGP::Finger::Result;
use Moose;
# ABSTRACT: a gpgfinger result object
our $VERSION = '1.1'; # VERSION
has 'keys' => (
is => 'ro', isa => 'ArrayRef[PGP::Finger::Key]', lazy => 1,
traits => [ 'Array' ],
default => sub { [] },
handles => {
add_key => 'push',
count => 'count',
},
lib/PGP/Finger/Result.pm view on Meta::CPAN
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
PGP::Finger::Result - a gpgfinger result object
=head1 VERSION
version 1.1
=head1 AUTHOR
Markus Benning <ich@markusbenning.de>
=head1 COPYRIGHT AND LICENSE
lib/PGP/Finger/Source.pm view on Meta::CPAN
package PGP::Finger::Source;
use Moose;
# ABSTRACT: base class for a gpgfinger source
our $VERSION = '1.1'; # VERSION
sub fetch {
die('unimplemented');
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
PGP::Finger::Source - base class for a gpgfinger source
=head1 VERSION
version 1.1
=head1 AUTHOR
Markus Benning <ich@markusbenning.de>
=head1 COPYRIGHT AND LICENSE