Result:
found 585 distributions and 1490 files matching your query ! ( run in 2.152 )


Mail-DMARC

 view release on metacpan or  search on metacpan

bin/install_deps.pl  view on Meta::CPAN

        'cache_metadata'          => q[1],
        'cpan_home'               => qq[$ENV{HOME}/.cpan],
        'ftp'                     => $ftp,
        'ftp_proxy'               => q[],
        'getcwd'                  => q[cwd],
        'gpg'                     => q[],
        'gzip'                    => $gzip,
        'histfile'                => qq[$ENV{HOME}/.cpan/histfile],
        'histsize'                => q[100],
        'http_proxy'              => q[],
        'inactivity_timeout'      => q[5],

 view all matches for this distribution


Mail-ExpandAliases

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN

my $dist = '$(DISTNAME)-$(VERSION).tar.gz';
my @EXE_FILES = ('expand-alias');
my %PREREQ_PM = ('IO::File');
my %clean     = ('FILES' => "$dist $dist.asc distdir");
my %macro     = (
    'GPG' => 'gpg',
    'AUTHOR' => 'darren@cpan.org',
);

WriteMakefile(
    NAME      => __PACKAGE__,

 view all matches for this distribution


Mail-GPG

 view release on metacpan or  search on metacpan

lib/Mail/GPG.pm  view on Meta::CPAN

sub get_debug                   { shift->{debug}                        }
sub get_debug_dir               { shift->{debug_dir}                    }
sub get_gnupg_hash_init         { shift->{gnupg_hash_init}              }
sub get_digest                  { shift->{digest}                       }
sub get_default_key_encrypt     { shift->{default_key_encrypt}          }
sub get_gpg_call                { shift->{gpg_call}                     }
sub get_no_strict_7bit_encoding { shift->{no_strict_7bit_encoding}      }
sub get_use_long_key_ids        { shift->{use_long_key_ids}             }

sub set_default_key_id          { shift->{default_key_id}       = $_[1] }
sub set_default_passphrase      { shift->{default_passphrase}   = $_[1] }
sub set_debug                   { shift->{debug}                = $_[1] }
sub set_debug_dir               { shift->{debug_dir}            = $_[1] }
sub set_gnupg_hash_init         { shift->{gnupg_hash_init}      = $_[1] }
sub set_digest                  { shift->{digest}               = $_[1] }
sub set_default_key_encrypt     { shift->{default_key_encrypt}  = $_[1] }
sub set_gpg_call                { shift->{gpg_call}             = $_[1] }
sub set_no_strict_7bit_encoding { shift->{no_strict_7bit_encoding}=$_[1]}
sub set_use_long_key_ids        { shift->{use_long_key_ids}     = $_[1] }

sub new {
    my $class = shift;
    my %par   = @_;
    my  ($default_key_id, $default_passphrase, $debug, $debug_dir) =
    @par{'default_key_id','default_passphrase','debug','debug_dir'};
    my  ($gnupg_hash_init, $digest, $gpg_call, $default_key_encrypt) =
    @par{'gnupg_hash_init','digest','gpg_call','default_key_encrypt'};
    my  ($no_strict_7bit_encoding, $use_long_key_ids) =
    @par{'no_strict_7bit_encoding','use_long_key_ids'};

    $debug_dir               ||= $ENV{DUMPDIR} || File::Spec->tmpdir . '/mail-gpg-test';
    $gnupg_hash_init         ||= {};
    $digest                  ||= "RIPEMD160";
    $gpg_call                ||= "gpg";
    $no_strict_7bit_encoding ||= 0;
    $use_long_key_ids        ||= 0;

    my $self = bless {
        default_key_id          => $default_key_id,

lib/Mail/GPG.pm  view on Meta::CPAN

        debug                   => $debug,
        debug_dir               => $debug_dir,
        gnupg_hash_init         => $gnupg_hash_init,
        digest                  => $digest,
        default_key_encrypt     => $default_key_encrypt,
        gpg_call                => $gpg_call,
        no_strict_7bit_encoding => $no_strict_7bit_encoding,
        use_long_key_ids        => $use_long_key_ids,
    }, $class;

    return $self;
}

sub new_gpg_interface {
    my $self = shift;
    my %par  = @_;
    my ($options, $passphrase) = @par{'options','passphrase'};

    my $gpg = GnuPG::Interface->new;

    $gpg->passphrase($passphrase) if defined $passphrase;
    $gpg->call( $self->get_gpg_call ) if $self->get_gpg_call ne '';

    my $gnupg_hash_init = $self->get_gnupg_hash_init;

    if ($options) {
        $gpg->options->hash_init( %{$options}, %{$gnupg_hash_init} );
    }
    else {
        $gpg->options->hash_init( %{$gnupg_hash_init} );
    }

    $gpg->options->push_extra_args( '--digest', $self->get_digest );
    $gpg->options->meta_interactive(0);

    return $gpg;
}

sub save_debug_file {
    my $self = shift;
    my %par  = @_;
    my ($name, $data, $data_fh ) = @par{'name','data','data_fh' };

    $name = $self->get_debug_dir . "/mgpg-" . $name;

    open( DBG, ">$name" ) or die "can't write $name";
    if ($data_fh) {
        seek $data_fh, 0, 0;
        print DBG $_ while <$data_fh>;

lib/Mail/GPG.pm  view on Meta::CPAN

    }

    return $is_armor;
}

sub perform_multiplexed_gpg_io {
    my $self = shift;
    my %par  = @_;
    my  ($data_fh, $data_canonify, $stdin_fh, $stderr_fh) =
    @par{'data_fh','data_canonify','stdin_fh','stderr_fh'};
    my  ($stdout_fh, $status_fh, $stderr_sref, $stdout_sref) =

lib/Mail/GPG.pm  view on Meta::CPAN


    my $buffer;
    while (1) {

        #-- as long we has data try to write
        #-- it into gpg
        while ( $data_fh && $stdin->can_write(0.001) ) {
            if ( $data_fh_glob
                ? read $data_fh,
                $buffer, 1024
                : $data_fh->read( $buffer, 1024 ) ) {

lib/Mail/GPG.pm  view on Meta::CPAN

                    #-- canonify it if requested
                    $buffer =~ s/\x0A/\x0D\x0A/g;
                    $buffer =~ s/\x0D\x0D\x0A/\x0D\x0A/g;
                }

                #-- feed it into gpg
                print $stdin_fh $buffer;
            }
            else {

                #-- no data read, close gpg's stdin
                #-- and set the data filehandle to false
                close $stdin_fh;
                $data_fh = 0;
            }
        }

        #-- probably we can read from gpg's stdout
        while ( $stdout->can_read(0.001) ) {
            last if eof($stdout_fh);
            $$stdout_sref .= <$stdout_fh>;
        }

        #-- probably we can read from gpg's stderr
        while ( $stderr->can_read(0.001) ) {
            last if eof($stderr_fh);
            $$stderr_sref .= <$stderr_fh>;
        }

        #-- probably we can read from gpg's status
        if ($status) {
            while ( $status->can_read(0.001) ) {
                last if eof($status_fh);
                $$status_sref .= <$status_fh>;
            }
        }

        #-- we're finished if no more data left
        #-- and both gpg's stdout and stderr
        #-- are at eof.
        return
            if !$data_fh
            && eof($stderr_fh)
            && eof($stdout_fh)

lib/Mail/GPG.pm  view on Meta::CPAN

  my $self = shift;
  my ($output_stdout, %par) = @_;
  my  ($coerce, $debug, $verbose) =
  @par{'coerce','debug','verbose'};

  #-- grab key ID's and emails from output (backward compatible to gpg 1.x)
  #
  #  Example:
  #  search request: "--list-keys --with-colons 6C187D0F196ED9E3"
  #  format        : see /usr/share/doc/packages/gpg2/DETAILS
  #
  #--OLD sample: gpg (GnuPG) 1.4.11
  #   tru:t:1:1431088683:0:3:1:5
  #   pub:-:1024:17:062F00DAE20F5035:2004-02-10:::-:Jörn Reder Mail\x3a\x3aGPG Test Key <mailgpg@localdomain>::scaESCA:
  #   sub:-:1024:16:6C187D0F196ED9E3:2004-02-10::::::e:
  #
  #   expected output: (062F00DAE20F5035, 'Jörn Reder Mail::GPG Test Key <mailgpg@localdomain>')
  #
  #--NEW sample: gpg (GnuPG) 2.0.22
  #  tru:t:1:1429473192:0:3:1:5
  #  pub:-:1024:17:062F00DAE20F5035:1076425915:::-:::scaESCA:
  #  uid:-::::1076425915::588869ADE077B8FB05788A99565AEED15AED8231::Jörn Reder Mail\x3a\x3aGPG Test Key <mailgpg@localdomain>:
  #  sub:-:1024:16:6C187D0F196ED9E3:1076425917::::::e:
  #
  #  expected output: (062F00DAE20F5035, 'Jörn Reder Mail::GPG Test Key <mailgpg@localdomain>',
  #                    6C187D0F196ED9E3, 'Jörn Reder Mail::GPG Test Key <mailgpg@localdomain>')
  #
  #  PERLBOTIX<ätt>cpan.org / May, 2015

  my @result;

lib/Mail/GPG.pm  view on Meta::CPAN

  $output_stdout .= "\nFLUSH\n"; #-- we add this token to trigger flushing of the last record

  #-- these values are valid per "paragraph" (from pub: to pub:)
  my @ids;                       #-- list of potential IDs (pub, sub)
  my @emails;                    #-- list of potential email adresses (uid)
  my $gpg2_mode = 0;             #-- auto-detect OLD/NEW format: true if NEW (gpg2) format

  #-- parse output line by line
  #--  OLD-format (gpg 1.x): simulate old behaviour
  #--  NEW-format (gpg 2.x): create all combinations of valid key-IDs and emails; return (pub) key-ID first,
  #    so the result stays backward compatible

  while (  $output_stdout =~ m!^((\w+):?.*?)[\r\n]+!mg  ) {

    my ($line, $tag) = ($1, $2);

lib/Mail/GPG.pm  view on Meta::CPAN

      last if defined $fields[1] and $fields[1] eq 'FLUSH';


      #-- parse 'new' format (pub:..;  next: uid:..., uid:..., sub:... )
      if ( not defined $fields[9] or $fields[9] =~ /^\s*$/ ) {
        $gpg2_mode = 1;
        push @ids, $fields[4];
      }
      #-- parse 'old' format (pub:)
      elsif ( $fields[9] =~ /<[^>]+>/ ) {
        $gpg2_mode = 0;
        push @ids, $fields[4];
        push @emails, $fields[9];
      }
      else {
        die "Cannot parse: ($line)";
      }

    } #-- 'pub' & 'FLUSH' handled obove

    #-- handle 'sub' entries  /  extract key-id
    elsif ( $tag eq 'sub'  and  $gpg2_mode  and   $fields[4]) {
      push @ids, $fields[4];
    }

    #-- handle 'uid' entries  /  extract email
    elsif ( $tag eq 'uid'  and  $gpg2_mode  and   $fields[9] =~ /<[^>]+>/ ) {
      push @emails, $fields[9];
    }

    #-- ignore anything else
    else {
      warn "Ignoring line [gpg2_mode=$gpg2_mode] --  '$line'"  if $debug;
    }

  } #-- loop over output_stdout

  warn  Data::Dumper->Dump( [ \@result], [qw(RESULT_AS_REF)] ) if $debug;

lib/Mail/GPG.pm  view on Meta::CPAN

sub query_keyring {
    my $self     = shift;
    my %par      = @_;
    my ($search, $debug) = @par{'search','debug'};

    #-- ignore any PIPE signals, in case of gpg exited
    #-- early before we fed our data into it.
    local $SIG{PIPE} = 'IGNORE';

    #-- we parse gpg's output and rely on english
    local $ENV{LC_ALL} = "C";

    #-- get a GnuPG::Interface
    my $gpg = $self->new_gpg_interface;

    #-- initialize Handles
    my $stdout  = IO::Handle->new;
    my $stderr  = IO::Handle->new;
    my $handles = GnuPG::Handles->new(
        stdout => $stdout,
        stderr => $stderr,
    );

    #-- execute gpg --list-public-keys
    my $pid = $gpg->wrap_call(
        handles      => $handles,
        commands     => [ "--list-keys", "--with-colons" ],
        command_args => [$search],
    );

    #-- fetch gpg's STDERR
    my $output_stderr;
    $output_stderr .= $_ while <$stderr>;
    close $stderr;

    #-- fetch gpg's STDOUT
    my $output_stdout;
    $output_stdout .= $_ while <$stdout>;
    close $stdout;

    #-- wait on gpg exit
    waitpid $pid, 0;

    if ( $debug ) {
      warn "LIST_KEYS(CMD)    -- --list-keys --with-colons $search\n";
      warn "LIST_KEYS(STDERR) -- search for ($search):\n$output_stderr\n";

lib/Mail/GPG.pm  view on Meta::CPAN

    #-- return result: undef if nothing found, first key-id if
    #-- a scalar is requested, all entries suitable for a hash
    #-- slurp if an array is requested

    # Compatibility note: The first id is always the id of the 'pub' entry, even for a subkey-hit.
    #                     gpgv2: The result should not be used to initialise a hash, since some emails will be clobbered.
    #                     We need another interface here. Curently Mail::GPG uses only the first entry...
    return            if not @result;
    return $result[0] if not wantarray;
    return @result;
}

lib/Mail/GPG.pm  view on Meta::CPAN

    my $self = shift;
    my %par  = @_;
    my  ($key_id, $passphrase, $entity) =
    @par{'key_id','passphrase','entity'};

    #-- ignore any PIPE signals, in case of gpg exited
    #-- early before we fed our data into it.
    local $SIG{PIPE} = 'IGNORE';

    #-- we parse gpg's output and rely on english
    local $ENV{LC_ALL} = "C";

    #-- get default key ID and passphrase, if not given
    $key_id     = $self->get_default_key_id     if not defined $key_id;
    $passphrase = $self->get_default_passphrase if not defined $passphrase;

lib/Mail/GPG.pm  view on Meta::CPAN

        entity => $entity,
        method => "sign",
    );

    #-- get a GnuPG::Interface
    my $gpg = $self->new_gpg_interface(
        options => {
            armor       => 1,
            default_key => $key_id,
        },
        passphrase => $passphrase,

lib/Mail/GPG.pm  view on Meta::CPAN

        stdin  => $stdin,
        stdout => $stdout,
        stderr => $stderr,
    );

    #-- execute gpg for signing
    my $pid = $gpg->detach_sign( handles => $handles );

    #-- put encoded entity data into temporary file
    #-- (faster than in-memory operation)
    my ( $data_fh, $data_file ) = File::Temp::tempfile();
    unlink $data_file;
    $sign_part->print($data_fh);

    #-- perform I/O (multiplexed to prevent blocking)
    my ( $output_stdout, $output_stderr ) = ("", "");
    $self->perform_multiplexed_gpg_io(
        data_fh       => $data_fh,
        data_canonify => 1,
        stdin_fh      => $stdin,
        stderr_fh     => $stderr,
        stdout_fh     => $stdout,
        stderr_sref   => \$output_stderr,
        stdout_sref   => \$output_stdout,
    );

    #-- close reader filehandles (stdin was closed
    #-- by perform_multiplexed_gpg_io())
    close $stdout;
    close $stderr;

    #-- fetch zombie
    waitpid $pid, 0;

lib/Mail/GPG.pm  view on Meta::CPAN

    my $self = shift;
    my %par = @_;
    my  ($key_id, $passphrase, $entity, $recipients, $_no_sign) =
    @par{'key_id','passphrase','entity','recipients','_no_sign'};

    #-- ignore any PIPE signals, in case of gpg exited
    #-- early before we fed our data into it.
    local $SIG{PIPE} = 'IGNORE';

    #-- we parse gpg's output and rely on english
    local $ENV{LC_ALL} = "C";

    #-- get default key ID and passphrase, if not given
    $key_id     = $self->get_default_key_id     if not defined $key_id;
    $passphrase = $self->get_default_passphrase if not defined $passphrase;

lib/Mail/GPG.pm  view on Meta::CPAN

        entity => $entity,
        method => "encrypt",
        );

    #-- get a GnuPG::Interface
    my $gpg = $self->new_gpg_interface(
        options => {
            armor       => 1,
            default_key => $key_id,
        },
        passphrase => $passphrase,
    );

    #-- add recipients, but first extract the mail-adress
    #-- part, otherwise gpg couldn't find keys for adresses
    #-- with quoted printable encodings in the name part-
    $recipients = $self->extract_mail_address( recipients => $recipients, );
    $gpg->options->push_recipients($_) for @{$recipients};

    #-- add default key to recipients if requested
    $gpg->options->push_recipients( $self->get_default_key_id )
        if $self->get_default_key_encrypt
        and $self->get_default_key_id;

    #-- initialize handles
    my $stdin   = IO::Handle->new;

lib/Mail/GPG.pm  view on Meta::CPAN

        stdin  => $stdin,
        stdout => $stdout,
        stderr => $stderr,
    );

    #-- execute gpg for encryption
    my $pid;
    if ($_no_sign) {
        $pid = $gpg->encrypt( handles => $handles );
    }
    else {
        $pid = $gpg->sign_and_encrypt( handles => $handles );
    }

    #-- put encoded entity data into temporary file
    #-- (faster than in-memory operation)
    my ( $data_fh, $data_file ) = File::Temp::tempfile();
    unlink $data_file;
    $encrypt_part->print($data_fh);

    #-- perform I/O (multiplexed to prevent blocking)
    my ( $output_stdout, $output_stderr ) = ("", "");
    $self->perform_multiplexed_gpg_io(
        data_fh       => $data_fh,
        data_canonify => 1,
        stdin_fh      => $stdin,
        stderr_fh     => $stderr,
        stdout_fh     => $stdout,
        stderr_sref   => \$output_stderr,
        stdout_sref   => \$output_stdout,
    );

    #-- close reader filehandles (stdin was closed
    #-- by perform_multiplexed_gpg_io())
    close $stdout;
    close $stderr;

    #-- fetch zombie
    waitpid $pid, 0;

lib/Mail/GPG.pm  view on Meta::CPAN

    my $self = shift;
    my %par  = @_;
    my  ($key_id, $passphrase, $entity) =
    @par{'key_id','passphrase','entity'};

    #-- ignore any PIPE signals, in case of gpg exited
    #-- early before we fed our data into it.
    local $SIG{PIPE} = 'IGNORE';

    #-- we parse gpg's output and rely on english
    local $ENV{LC_ALL} = "C";

    #-- get default key ID and passphrase, if not given
    $key_id     = $self->get_default_key_id     if not defined $key_id;
    $passphrase = $self->get_default_passphrase if not defined $passphrase;

lib/Mail/GPG.pm  view on Meta::CPAN

        die "Content transfer encoding '$encoding' is not 7bit safe"
            unless $encoding =~ /^(quoted-printable|base64|7bit)\s*$/i;
    }

    #-- get a GnuPG::Interface, with ASCII armor enabled
    my $gpg = $self->new_gpg_interface(
        options => {
            armor       => 1,
            default_key => $key_id,
        },
        passphrase => $passphrase,

lib/Mail/GPG.pm  view on Meta::CPAN

        stdin  => $stdin,
        stdout => $stdout,
        stderr => $stderr,
    );

    #-- execute gpg for signing
    my $pid = $gpg->clearsign( handles => $handles );

    #-- put encoded entity data into temporary file
    #-- (faster than in-memory operation)
    my ( $data_fh, $data_file ) = File::Temp::tempfile();
    unlink $data_file;
    $entity->print($data_fh);

    #-- perform I/O (multiplexed to prevent blocking)
    my ( $output_stdout, $output_stderr ) = ("", "");
    $self->perform_multiplexed_gpg_io(
        data_fh       => $data_fh,
        data_canonify => 1,
        stdin_fh      => $stdin,
        stderr_fh     => $stderr,
        stdout_fh     => $stdout,
        stderr_sref   => \$output_stderr,
        stdout_sref   => \$output_stdout,
    );

    #-- close reader filehandles (stdin was closed
    #-- by perform_multiplexed_gpg_io())
    close $stdout;
    close $stderr;

    #-- fetch zombie
    waitpid $pid, 0;

lib/Mail/GPG.pm  view on Meta::CPAN

    my $self = shift;
    my %par = @_;
    my  ($key_id, $passphrase, $entity, $recipients, $_no_sign) =
    @par{'key_id','passphrase','entity','recipients','_no_sign'};

    #-- ignore any PIPE signals, in case of gpg exited
    #-- early before we fed our data into it.
    local $SIG{PIPE} = 'IGNORE';

    #-- we parse gpg's output and rely on english
    local $ENV{LC_ALL} = "C";

    #-- get default key ID and passphrase, if not given
    if ( not $_no_sign ) {
        $key_id = $self->get_default_key_id if not defined $key_id;

lib/Mail/GPG.pm  view on Meta::CPAN


    #-- check parameters
    die "Entity has no body" if not $entity->bodyhandle;

    #-- get a GnuPG::Interface, with ASCII armor enabled
    my $gpg = $self->new_gpg_interface(
        options => {
            armor       => 1,
            default_key => $key_id,
        },
        passphrase => $passphrase,
    );

    #-- add recipients, but first extract the mail-adress
    #-- part, otherwise gpg couldn't find keys for adresses
    #-- with quoted printable encodings in the name part-
    $recipients = $self->extract_mail_address( recipients => $recipients, );
    $gpg->options->push_recipients($_) for @{$recipients};

    #-- add default key to recipients if requested
    $gpg->options->push_recipients( $self->get_default_key_id )
        if $self->get_default_key_encrypt
        and $self->get_default_key_id;

    #-- initialize handles
    my $stdin   = IO::Handle->new;

lib/Mail/GPG.pm  view on Meta::CPAN

        stdin  => $stdin,
        stdout => $stdout,
        stderr => $stderr,
    );

    #-- execute gpg for encryption
    my $pid;
    if ($_no_sign) {
        $pid = $gpg->encrypt( handles => $handles );
    }
    else {
        $pid = $gpg->sign_and_encrypt( handles => $handles );
    }

    #-- put encoded entity data into temporary file
    #-- (faster than in-memory operation)
    my ( $data_fh, $data_file ) = File::Temp::tempfile();
    unlink $data_file;
    $entity->print($data_fh);

    #-- perform I/O (multiplexed to prevent blocking)
    my ( $output_stdout, $output_stderr ) = ("", "");
    $self->perform_multiplexed_gpg_io(
        data_fh       => $data_fh,
        data_canonify => 0,
        stdin_fh      => $stdin,
        stderr_fh     => $stderr,
        stdout_fh     => $stdout,
        stderr_sref   => \$output_stderr,
        stdout_sref   => \$output_stdout,
    );

    #-- close reader filehandles (stdin was closed
    #-- by perform_multiplexed_gpg_io())
    close $stdout;
    close $stderr;

    #-- fetch zombie
    waitpid $pid, 0;

lib/Mail/GPG.pm  view on Meta::CPAN

sub decrypt {
    my $self = shift;
    my %par  = @_;
    my ($entity, $passphrase) = @par{'entity','passphrase'};

    #-- ignore any PIPE signals, in case of gpg exited
    #-- early before we fed our data into it.
    local $SIG{PIPE} = 'IGNORE';

    #-- we parse gpg's output and rely on english
    local $ENV{LC_ALL} = "C";

    #-- get default passphrase, if not given
    $passphrase = $self->get_default_passphrase if not defined $passphrase;

lib/Mail/GPG.pm  view on Meta::CPAN

        entity              => $entity,
        encrypted_text_sref => \$encrypted_text,
    );

    #-- get a GnuPG::Interface
    my $gpg = $self->new_gpg_interface( passphrase => $passphrase, );

    #-- initialize handles
    my $stdin  = IO::Handle->new;
    my $stdout = IO::Handle->new;
    my $stderr = IO::Handle->new;

lib/Mail/GPG.pm  view on Meta::CPAN

        stdout => $stdout,
        stderr => $stderr,
        status => $status,
    );

    #-- start gpg for decryption
    my $pid = $gpg->decrypt( handles => $handles );

    #-- put encoded entity data into temporary file
    #-- (faster than in-memory operation)
    my ( $data_fh, $data_file ) = File::Temp::tempfile();
    unlink $data_file;
    print $data_fh $encrypted_text;

    #-- perform I/O (multiplexed to prevent blocking)
    my ( $output_stdout, $output_stderr, $output_status ) = ( "", "", "" );

    $self->perform_multiplexed_gpg_io(
        data_fh       => $data_fh,
        data_canonify => 1,
        stdin_fh      => $stdin,
        stderr_fh     => $stderr,
        stdout_fh     => $stdout,

lib/Mail/GPG.pm  view on Meta::CPAN

        stdout_sref   => \$output_stdout,
        status_sref   => \$output_status,
    );

    #-- close reader filehandles (stdin was closed
    #-- by perform_multiplexed_gpg_io())
    close $stdout;
    close $stderr;

    #-- fetch zombie
    waitpid $pid, 0;

lib/Mail/GPG.pm  view on Meta::CPAN

            name => "dec-data.txt",
            data => $dec_entity->as_string,
        );
    }

    #-- fetch information from gpg's stderr output
    #-- and construct a Mail::GPG::Result object from it
    my $result = Mail::GPG::Result->new(
        mail_gpg   => $self,
        gpg_stdout => \$output_stdout,
        gpg_stderr => \$output_stderr,
        gpg_status => \$output_status,
        gpg_rc     => $rc,
    );

    #-- return decrypted entity and result object
    return $dec_entity if not wantarray;
    return ( $dec_entity, $result );

lib/Mail/GPG.pm  view on Meta::CPAN

sub verify {
    my $self     = shift;
    my %par      = @_;
    my ($entity) = $par{'entity'};

    #-- ignore any PIPE signals, in case of gpg exited
    #-- early before we fed our data into it.
    local $SIG{PIPE} = 'IGNORE';

    #-- we parse gpg's output and rely on english
    local $ENV{LC_ALL} = "C";

    #-- check if the entity is signed
    my ( $signed_text, $signature_text );

lib/Mail/GPG.pm  view on Meta::CPAN

    else {
        die "Entity is not multipart/signed and has no body";
    }

    #-- get a GnuPG::Interface
    my $gpg = $self->new_gpg_interface;

    #-- initialize handles
    my $stdin  = IO::Handle->new;
    my $stdout = IO::Handle->new;
    my $stderr = IO::Handle->new;

lib/Mail/GPG.pm  view on Meta::CPAN

        #-- signature is detached, save it to a temp file
        ( $sign_fh, $sign_file ) = File::Temp::tempfile();
        print $sign_fh $signature_text;
        close $sign_fh;

        #-- pass signature filename to gpg
        $pid = $gpg->verify(
            handles      => $handles,
            command_args => [ $sign_file, "-" ],
        );

    }
    else {

        #-- ASCII armor message with embedded signature
        $pid = $gpg->verify( handles => $handles, );
    }

    #-- put encoded entity data into temporary file
    #-- (faster than in-memory operation)
    my ( $data_fh, $data_file ) = File::Temp::tempfile();
    unlink $data_file;
    print $data_fh $signed_text;

    #-- perform I/O (multiplexed to prevent blocking)
    my ( $output_stdout, $output_stderr, $output_status ) = ( "", "", "" );
    $self->perform_multiplexed_gpg_io(
        data_fh       => $data_fh,
        data_canonify => 1,
        stdin_fh      => $stdin,
        stderr_fh     => $stderr,
        stdout_fh     => $stdout,

lib/Mail/GPG.pm  view on Meta::CPAN

        stdout_sref   => \$output_stdout,
        status_sref   => \$output_status,
    );

    #-- close reader filehandles (stdin was closed
    #-- by perform_multiplexed_gpg_io())
    close $stdout;
    close $stderr;

    #-- fetch zombie
    waitpid $pid, 0;

lib/Mail/GPG.pm  view on Meta::CPAN

            data => \$signed_text,
        );
    }

    #-- construct a Mail::GPG::Result object from
    #-- gpg's stderr output
    my $result = Mail::GPG::Result->new(
        mail_gpg   => $self,
        gpg_stdout => \$output_stdout,
        gpg_stderr => \$output_stderr,
        gpg_status => \$output_status,
        gpg_rc     => $rc,
    );

    #-- return result object
    return $result;
}

lib/Mail/GPG.pm  view on Meta::CPAN

sub get_decrypt_key {
    my $self     = shift;
    my %par      = @_;
    my ($entity) = $par{'entity'};

    #-- ignore any PIPE signals, in case of gpg exited
    #-- early before we fed our data into it.
    local $SIG{PIPE} = 'IGNORE';

    #-- we parse gpg's output and rely on english
    local $ENV{LC_ALL} = "C";

    #-- check if the entity is encrypted at all
    #-- (dies if not)
    my $encrypted_text;

lib/Mail/GPG.pm  view on Meta::CPAN

        entity              => $entity,
        encrypted_text_sref => \$encrypted_text,
    );

    #-- get a GnuPG::Interface
    my $gpg = $self->new_gpg_interface;

    #-- initialize handles
    my $stdin   = IO::Handle->new;
    my $stdout  = IO::Handle->new;
    my $stderr  = IO::Handle->new;

lib/Mail/GPG.pm  view on Meta::CPAN

        stdin  => $stdin,
        stdout => $stdout,
        stderr => $stderr,
    );

    #-- start gpg for decryption
    my $pid = $gpg->wrap_call(
        handles  => $handles,
        commands =>
            [ "--decrypt", "--batch", "--list-only", "--status-fd", "1" ],
    );

lib/Mail/GPG.pm  view on Meta::CPAN

    unlink $data_file;
    print $data_fh $encrypted_text;

    #-- perform I/O (multiplexed to prevent blocking)
    my ( $output_stdout, $output_stderr ) = ( "", "" );
    $self->perform_multiplexed_gpg_io(
        data_fh       => $data_fh,
        data_canonify => 1,
        stdin_fh      => $stdin,
        stderr_fh     => $stderr,
        stdout_fh     => $stdout,
        stderr_sref   => \$output_stderr,
        stdout_sref   => \$output_stdout,
    );

    #-- close reader filehandles (stdin was closed
    #-- by perform_multiplexed_gpg_io())
    close $stdout;
    close $stderr;

    #-- fetch zombie
    waitpid $pid, 0;

lib/Mail/GPG.pm  view on Meta::CPAN


    # Suppress warnings about unknown record type 'tru'
    # in GnuPG::Interface
    local $SIG{__WARN__} = sub {1};

    my $gpg  = $self->new_gpg_interface;
    my @keys = $gpg->get_public_keys($key_id);

    croak "Request for key ID '$key_id' got multiple result"
        if @keys > 1;

    return "" unless $keys[0];

lib/Mail/GPG.pm  view on Meta::CPAN

  % perl Makefile.PL
  % make test
  % make install

Mail::GPG has a bunch of tests which will create a temporary
gpg keyring to be able to do real encryption and stuff. You
need to have gpg in your path for the tests to succeed, otherwise
all useful tests will be skipped.

Note that the test 04.big needs some time, on an Athlon 1800XP
about 12 seconds, so be patient ;)

lib/Mail/GPG.pm  view on Meta::CPAN

Currently none. Please report any bugs to the author: Joern Reder
<joern AT zyn.de>.

=head1 EXAMPLES

The Mail::GPG distribution contains the program mgpg-test:

  Usage: mgpg-test file ...

It takes one or more filenames of mails as
arguments, analyzes them, prints information about
signatures and decrypts encrypteded mails (after asking
for the correspondent passphrases). The script is rather

lib/Mail/GPG.pm  view on Meta::CPAN


=item B<gnupg_hash_init>

This attribute corresponds to the GnuPG::Interface hash_init
attribute. Please refer to the GnuPG::Interface manpage for
details. E.g. you can set gpg's --homedir option this way
and much more.

=item B<digest>

This is the digest used by GnuPG to calculate hash values
for signatures. By default Mail::GPG sets it to "RIPEMD160",
which is needed to handle DSA keys (which are very common).
You can check the supported digests of your gpg installation
by executing 'gpg --version'.

=item B<default_key_encrypt>

Set this attribute to a true value if you whish to have the
B<default_key_id> always added as a recipient for encrypted

lib/Mail/GPG.pm  view on Meta::CPAN

Mail::GPG prior version 1.0.4 always used short 32 bit key id's.
By setting this attribute to TRUE you can switch to long
64bit key id's. This affects the query_keyring() method and
the key id's stored in Mail::GPG::Result.

=item B<gpg_call>

This defaults to 'gpg' and is the path of the gpg program
executed through GnuPG::Interface. Change this attribute
if the 'gpg' program is not in your PATH.

=back

=head1 METHODS TO CREATE MIME OpenPGP MESSAGES (RFC 3156)

lib/Mail/GPG.pm  view on Meta::CPAN

use GnuPG::Interface->get_public_keys and
GnuPG::Interface->get_secret_keys instead. For
details refer to the GnuPG::PrimaryKey manpage.

If you use Perl 5.8.0 or better email addresses will
be returned as an utf8 enabled scalar, because gpg always
lists email adresses in utf8. Since Perl > 5.8.0 handles
utf8 very nice and transparently, you mostly don't need
to care about this ;)

If you use the module with older Perl versions you need

lib/Mail/GPG.pm  view on Meta::CPAN

(patched version only!)

=back


Tests: All temporary files are created in directory F</tmp/mail-gpg-test> now.
The environment variable C<DUMPDIR> can be used to select an alternative directory.



=head2 get_key_trust

 view all matches for this distribution


Mail-GnuPG

 view release on metacpan or  search on metacpan

lib/Mail/GnuPG.pm  view on Meta::CPAN

  Create a new Mail::GnuPG instance.

 Arguments:
   Paramhash...

   key    => gpg key id
   keydir => gpg configuration/key directory
   passphrase => primary key password
   use_agent => use gpg-agent if non-zero
   always_trust => always trust a public key
   # FIXME: we need more things here, maybe primary key id.


=cut

lib/Mail/GnuPG.pm  view on Meta::CPAN

  my $class = ref($proto) || $proto;
  my $self  = {
	       key	    => undef,
	       keydir	    => undef,
	       passphrase   => "",
	       gpg_path	    => "gpg",
	       use_agent    => 0,	
	       @_
	      };
  $self->{last_message} = [];
  $self->{plaintext} = [];

lib/Mail/GnuPG.pm  view on Meta::CPAN

  }

  if (defined $self->{always_trust}) {
    $gnupg->options->always_trust($self->{always_trust})
  }
  $gnupg->call( $self->{gpg_path} ) if defined $self->{gpg_path};
}


=head2 decrypt

lib/Mail/GnuPG.pm  view on Meta::CPAN

  The message can either be in RFC compliant-ish multipart/encrypted
  format, or just a single part ascii armored message.

 Output:
  On Failure:
    Exit code of gpg.  (0 on success)

  On Success: (just encrypted)
    (0, undef, undef)

  On success: (signed and encrypted)

lib/Mail/GnuPG.pm  view on Meta::CPAN


   where the keyid is the key that signed it, and emailaddress is full
   name and email address of the primary uid


  $self->{last_message} => any errors from gpg
  $self->{plaintext}    => plaintext output from gpg
  $self->{decrypted}    => parsed output as MIME::Entity

=cut

sub decrypt {

lib/Mail/GnuPG.pm  view on Meta::CPAN


  return if not $key;

  # get mail address of this key
  die "Invalid Key Format: $key" unless $key =~ /^[0-9A-F]+$/i;
  my $cmd = $self->{gpg_path} . " --with-colons --list-keys $key 2>&1";
  my $gpg_out = qx[ $cmd ];
  ## FIXME: this should probably use open| instead.
  die "Couldn't find key $key in keyring" if $gpg_out !~ /\S/ or $?;
  my $mail = (split(":", $gpg_out))[9];

  return ($mail, $key);
}

=head2 verify

lib/Mail/GnuPG.pm  view on Meta::CPAN

  the C<decode_bodies> method of MIME::Parser. See the MIME::Parser
  documentation for more information.

 Output:
  On error:
    Exit code of gpg.  (0 on success)
  On success
    ( 0,
      keyid,           # ABCDDCBA
      emailaddress     # Foo Bar <foo@bar.com>
    )

   where the keyid is the key that signed it, and emailaddress is full
   name and email address of the primary uid. The email/uid is UTF8
   encoded, as output by GPG.

  $self->{last_message} => any errors from gpg

=cut

# Verify RFC2015/RFC3156 email
sub verify {

lib/Mail/GnuPG.pm  view on Meta::CPAN

  my $gnupg = GnuPG::Interface->new();
  $self->_set_options($gnupg);
  my @keys = $gnupg->get_public_keys();
  foreach my $key (@keys) {
    foreach my $uid ($key->user_ids) {
      # M::A may not parse the gpg stuff properly.  Cross fingers
      my ($a) = Mail::Address->parse($uid->as_string); # list context, please
      $key_cache{$a->address}=1 if ref $a;
    }
  }
}

lib/Mail/GnuPG.pm  view on Meta::CPAN


 Input:
   MIME::Entity containing email message to sign

 Output:
  Exit code of gpg.  (0 on success)

  $self->{last_message} => any errors from gpg

  The provided $entity will be signed.  (i.e. it _will_ be modified.)

=cut

lib/Mail/GnuPG.pm  view on Meta::CPAN

 Input:
   MIME::Entity containing email message to sign.
   This entity MUST have a body.

 Output:
  Exit code of gpg.  (0 on success)

  $self->{last_message} => any errors from gpg

  The provided $entity will be signed.  (i.e. it _will_ be modified.)

=cut

lib/Mail/GnuPG.pm  view on Meta::CPAN

   This entity MUST have a body.

   list of recipients

 Output:
  Exit code of gpg.  (0 on success)

  $self->{last_message} => any errors from gpg

  The provided $entity will be encrypted.  (i.e. it _will_ be modified.)

=head2 ascii_signencrypt

lib/Mail/GnuPG.pm  view on Meta::CPAN

   This entity MUST have a body.

   list of recipients

 Output:
  Exit code of gpg.  (0 on success)

  $self->{last_message} => any errors from gpg

  The provided $entity will be encrypted.  (i.e. it _will_ be modified.)

=cut

lib/Mail/GnuPG.pm  view on Meta::CPAN

 Input:
   MIME::Entity containing email message to encrypt
   list of email addresses to sign to

 Output:
  Exit code of gpg.  (0 on success)

  $self->{last_message} => any errors from gpg

  The provided $entity will be encrypted.  (i.e. it _will_ be modified.)

=head2 mime_signencrypt

lib/Mail/GnuPG.pm  view on Meta::CPAN

 Input:
   MIME::Entity containing email message to sign encrypt
   list of email addresses to sign to

 Output:
  Exit code of gpg.  (0 on success)

  $self->{last_message} => any errors from gpg

  The provided $entity will be encrypted.  (i.e. it _will_ be modified.)

=cut

lib/Mail/GnuPG.pm  view on Meta::CPAN

#              containing the data to write
# return value:
#  $rbuf_of  - hash ref indexed by the stringified handles
#              containing the data that has been read
#
# read and write errors due to EPIPE (gpg exit) are skipped silently on the
# assumption that gpg will explain the problem on the error handle
#
# other errors cause a non-fatal warning, processing continues on the rest
# of the file handles
#
# NOTE: all the handles get closed inside this function

lib/Mail/GnuPG.pm  view on Meta::CPAN

            my $count = sysread($rhandle, $rbuf_of->{$rhandle},
                                $blocksize, length($rbuf_of->{$rhandle}));
            warn("read $count bytes from handle $n") if $DEBUG;
            if (!defined $count) { # read error
                if ($!{EPIPE}) {
                    warn("read failure (gpg exited?) from handle $n: $!")
                        if $DEBUG;
                } else {
                    warn("read failure from handle $n: $!");
                }
                $reader->remove($rhandle);

lib/Mail/GnuPG.pm  view on Meta::CPAN

            $woffset_of->{$whandle} = 0 if !exists $woffset_of->{$whandle};
            my $count = syswrite($whandle, $wbuf_of->{$whandle},
                                 $blocksize, $woffset_of->{$whandle});
            if (!defined $count) {
                if ($!{EPIPE}) { # write error
                    warn("write failure (gpg exited?) from handle $n: $!")
                        if $DEBUG;
                } else {
                    warn("write failure from handle $n: $!");
                }
                $writer->remove($whandle);

 view all matches for this distribution


Mail-MIMEDefang

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN

\t\$(MD_INSTALL_DATA) SpamAssassin/spamassassin.cf \\
\t    \$(DESTDIR)\$(MD_CONFDIR)/sa-mimedefang.cf.example
\t\$(MD_INSTALL_DATA) examples/suggested-minimum-filter-for-windows-clients \\
\t    \$(DESTDIR)\$(MD_CONFDIR)/mimedefang-filter

distgpg: dist
	gpg --detach-sign \$(DISTVNAME).tar.gz

# ============================================================
# RPM spec file (generated from redhat/mimedefang-spec.in)
# ============================================================
spec: redhat/mimedefang.spec

 view all matches for this distribution


Mail-Make

 view release on metacpan or  search on metacpan

lib/Mail/Make.pm  view on Meta::CPAN

#   Any of the above + attachments -> multipart/mixed
sub as_entity
{
    my $self = shift( @_ );

    # When gpg_sign() / gpg_encrypt() / gpg_sign_encrypt() have already assembled the
    # top-level entity (stored in _gpg_entity), return it directly. Envelope headers have
    # already been merged by _wrap_in_mail().
    return( $self->{_gpg_entity} ) if( defined( $self->{_gpg_entity} ) );

    # S/MIME: entity pre-assembled by Mail::Make::SMIME::_build_from_smime_output().
    # Headers are already embedded in the parsed entity; return it directly.
    return( $self->{_smime_entity} ) if( defined( $self->{_smime_entity} ) );

lib/Mail/Make.pm  view on Meta::CPAN

# This is used when we know the message will be large, or when we want to bound peak 
# memory use unconditionally.
# Default: false.
sub use_temp_file { return( shift->_set_get_boolean( 'use_temp_file', @_ ) ); }

# gpg_encrypt( %opts )
# Encrypts this message for one or more recipients and returns a new Mail::Make object
# whose body is a RFC 3156 multipart/encrypted structure.
#
# Required options:
#   Recipients => [ 'alice@example.com', ... ]
#
# Optional options:
#   GpgBin    => '/usr/bin/gpg2'
#   KeyServer => 'keys.openpgp.org'
#   AutoFetch => 1
#   Digest    => 'SHA256'
sub gpg_encrypt
{
    my $self = shift( @_ );
    my $opts = $self->_get_args_as_hash( @_ );
    require Mail::Make::GPG;
    my $gpg  = Mail::Make::GPG->new(
        ( defined( $opts->{GpgBin}    ) ? ( gpg_bin    => $opts->{GpgBin}    ) : () ),
        ( defined( $opts->{Digest}    ) ? ( digest     => $opts->{Digest}    ) : () ),
        ( defined( $opts->{KeyServer} ) ? ( keyserver  => $opts->{KeyServer} ) : () ),
        ( defined( $opts->{AutoFetch} ) ? ( auto_fetch => $opts->{AutoFetch} ) : () ),
    ) || return( $self->pass_error( Mail::Make::GPG->error ) );

    my $recipients = $opts->{Recipients} ||
        return( $self->error( 'Recipients option is required.' ) );
    $recipients = [ $recipients ] unless( ref( $recipients ) eq 'ARRAY' );

    return( $gpg->encrypt(
        entity     => $self,
        recipients => $recipients,
    ) || $self->pass_error( $gpg->error ) );
}

# gpg_sign( %opts )
# Signs this message and returns a new Mail::Make object whose body is a
# RFC 3156 multipart/signed structure with a detached ASCII-armoured signature.
#
# Required options:
#   KeyId => '35ADBC3AF8355E845139D8965F3C0261CDB2E752'
#
# Optional options:
#   Passphrase => 'secret'   # or CODE ref; omit to use gpg-agent
#   Digest     => 'SHA256'
#   GpgBin     => '/usr/bin/gpg2'
sub gpg_sign
{
    my $self = shift( @_ );
    my $opts = $self->_get_args_as_hash( @_ );
    require Mail::Make::GPG;
    my $gpg  = Mail::Make::GPG->new(
        ( defined( $opts->{GpgBin} ) ? ( gpg_bin => $opts->{GpgBin} ) : () ),
        ( defined( $opts->{Digest} ) ? ( digest  => $opts->{Digest} ) : () ),
    ) || return( $self->pass_error( Mail::Make::GPG->error ) );

    return( $gpg->sign(
        entity     => $self,
        key_id     => ( $opts->{KeyId}      // '' ),
        passphrase => ( $opts->{Passphrase} // undef ),
        ( defined( $opts->{Digest} ) ? ( digest => $opts->{Digest} ) : () ),
    ) || $self->pass_error( $gpg->error ) );
}

# gpg_sign_encrypt( %opts )
# Signs then encrypts this message. Returns a new Mail::Make object whose body is a
# RFC 3156 multipart/encrypted structure containing a signed and encrypted payload.
#
# Required options:
#   KeyId      => '35ADBC3AF8355E845139D8965F3C0261CDB2E752'
#   Recipients => [ 'alice@example.com', ... ]
#
# Optional options:
#   Passphrase => 'secret'   # or CODE ref
#   Digest     => 'SHA256'
#   GpgBin     => '/usr/bin/gpg2'
#   KeyServer  => 'keys.openpgp.org'
#   AutoFetch  => 1
sub gpg_sign_encrypt
{
    my $self = shift( @_ );
    my $opts = $self->_get_args_as_hash( @_ );
    require Mail::Make::GPG;
    my $gpg  = Mail::Make::GPG->new(
        ( defined( $opts->{GpgBin}    ) ? ( gpg_bin    => $opts->{GpgBin}    ) : () ),
        ( defined( $opts->{Digest}    ) ? ( digest     => $opts->{Digest}    ) : () ),
        ( defined( $opts->{KeyServer} ) ? ( keyserver  => $opts->{KeyServer} ) : () ),
        ( defined( $opts->{AutoFetch} ) ? ( auto_fetch => $opts->{AutoFetch} ) : () ),
    ) || return( $self->pass_error( Mail::Make::GPG->error ) );

    my $recipients = $opts->{Recipients} ||
        return( $self->error( 'Recipients option is required.' ) );
    $recipients = [ $recipients ] unless( ref( $recipients ) eq 'ARRAY' );

    return( $gpg->sign_encrypt(
        entity     => $self,
        key_id     => ( $opts->{KeyId}      // '' ),
        passphrase => ( $opts->{Passphrase} // undef ),
        recipients => $recipients,
        ( defined( $opts->{Digest} ) ? ( digest => $opts->{Digest} ) : () ),
    ) || $self->pass_error( $gpg->error ) );
}


# smime_encrypt( %opts )
# Encrypts this message for one or more recipients. Returns a new Mail::Make object whose

lib/Mail/Make.pm  view on Meta::CPAN


When true, L</as_string_ref> always spools to a temporary file regardless of message size. Useful when you know the message will be large, or when you want to bound peak memory use unconditionally. Default: false.

=head1 GPG METHODS

These methods delegate to L<Mail::Make::GPG>, which requires L<IPC::Run> and a working C<gpg> (or C<gpg2>) installation. All three methods produce RFC 3156-compliant messages and return a new L<Mail::Make> object suitable for passing directly to C<sm...

=head2 gpg_encrypt( %opts )

Encrypts this message for one or more recipients and returns a new L<Mail::Make> object whose entity is an RFC 3156 C<multipart/encrypted; protocol="application/pgp-encrypted"> message.

Required options:

lib/Mail/Make.pm  view on Meta::CPAN


=over 4

=item C<< AutoFetch => $bool >>

When true and C<KeyServer> is set, calls C<gpg --locate-keys> for each recipient before encryption. Default: C<0>.

=item C<< Digest => $algorithm >>

Hash algorithm for the signature embedded in the encrypted payload.
Default: C<SHA256>.

=item C<< GpgBin => $path >>

Full path to the C<gpg> executable. Defaults to searching C<gpg2> then C<gpg> in C<PATH>.

=item C<< KeyServer => $url >>

Keyserver URL for auto-fetching recipient public keys (e.g. C<'keys.openpgp.org'>). Only consulted when C<AutoFetch> is true.

=back

=head2 gpg_sign( %opts )

Signs this message and returns a new L<Mail::Make> object whose entity is an RFC 3156 C<multipart/signed; protocol="application/pgp-signature"> message with a detached, ASCII-armoured signature.

Required options:

lib/Mail/Make.pm  view on Meta::CPAN


Valid values: C<SHA256>, C<SHA384>, C<SHA512>, C<SHA1>.

=item C<< GpgBin => $path >>

Full path to the C<gpg> executable.

=item C<< Passphrase => $string_or_coderef >>

Passphrase to unlock the secret key. May be a plain string or a C<CODE> reference called with no arguments at signing time. When omitted, GnuPG's agent handles passphrase prompting.

=back

=head2 gpg_sign_encrypt( %opts )

Signs then encrypts this message. Returns a new L<Mail::Make> object whose entity is an RFC 3156 C<multipart/encrypted> message containing a signed and encrypted OpenPGP payload.

Accepts all options from both L</gpg_sign> and L</gpg_encrypt>.

B<Note:> C<KeyId> and C<Recipients> are both required.

B<Typical usage:>

    # Sign only
    my $signed = $mail->gpg_sign(
        KeyId      => '35ADBC3AF8355E845139D8965F3C0261CDB2E752',
        Passphrase => 'my-passphrase',   # or: sub { MyKeyring::get('gpg') }
    ) || die( $mail->error );
    $signed->smtpsend( Host => 'smtp.example.com' );

    # Encrypt only
    my $encrypted = $mail->gpg_encrypt(
        Recipients => [ 'alice@example.com' ],
    ) || die( $mail->error );

    # Sign then encrypt
    my $protected = $mail->gpg_sign_encrypt(
        KeyId      => '35ADBC3AF8355E845139D8965F3C0261CDB2E752',
        Passphrase => sub { MyKeyring::get_passphrase() },
        Recipients => [ 'alice@example.com', 'bob@example.com' ],
    ) || die( $mail->error );

lib/Mail/Make.pm  view on Meta::CPAN


=head2 Memory usage

All three methods load the complete serialised message into memory before performing any cryptographic operation. This is a fundamental constraint imposed by two factors: the L<Crypt::SMIME> API accepts only Perl strings (no filehandle or streaming i...

For typical email messages this is not a concern. If you anticipate very large attachments, consider L<Mail::Make::GPG> instead, which delegates to the C<gpg> command-line tool via L<IPC::Run> and can handle arbitrary message sizes through temporary ...

See L<Mail::Make::SMIME/"MEMORY USAGE AND LIMITATIONS"> for a full discussion.

=head2 smime_encrypt( %opts )

 view all matches for this distribution


Mail-Message

 view release on metacpan or  search on metacpan

t/204-sgfolder.mbox  view on Meta::CPAN

Subject: Re: Mail::Box::DBI (was Re: Mail::Box v2.043)
In-Reply-To: <20030710125253.L5754@speeltuin.ATComputing.nl>
Message-ID: <Pine.OSX.4.56.0307101923360.2007@revf>
References: <20030710103707.J5754@speeltuin.ATComputing.nl>
 <1057832283.1546.60.camel@frodo> <20030710125253.L5754@speeltuin.ATComputing.nl>
X-PGP-Key: http://nothingmuch.woobling.org/gpg-key-0xEBD27418.asc
X-Habeas-SWE-1: winter into spring
X-Habeas-SWE-2: brightly anticipated
X-Habeas-SWE-3: like Habeas SWE (tm)
X-Habeas-SWE-4: Copyright 2002 Habeas (tm)
X-Habeas-SWE-5: Sender Warranted Email (SWE) (tm). The sender of this

t/204-sgfolder.mbox  view on Meta::CPAN

ciao ciao!

- -- 
Yuval Kogman  ( nothingmuch@woobling.org | nothingmuch@altern.org )
kung foo master: /me sushi-spin-kicks : neeyah!!!!!!!!!!!!!!!!!!!!!
et perl hacker. !@# http://nothingmuch.woobling.org/ gpg:0xEBD27418
http://wecanstopspam.org/                    http://www.habeas.com/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (Darwin)
Comment: pgpenvelope 2.10.2 - http://pgpenvelope.sourceforge.net/

t/204-sgfolder.mbox  view on Meta::CPAN

Date: Tue, 15 Jul 2003 04:06:12 +0300 (IDT)
From: Yuval Kojman <lists@woobling.org>
To: mailbox@perl.overmeer.net
Subject: mailbox imap/pop server plans
Message-ID: <Pine.OSX.4.56.0307150404001.22084@revf>
X-PGP-Key: http://nothingmuch.woobling.org/gpg-key-0xEBD27418.asc
X-Habeas-SWE-1: winter into spring
X-Habeas-SWE-2: brightly anticipated
X-Habeas-SWE-3: like Habeas SWE (tm)
X-Habeas-SWE-4: Copyright 2002 Habeas (tm)
X-Habeas-SWE-5: Sender Warranted Email (SWE) (tm). The sender of this

t/204-sgfolder.mbox  view on Meta::CPAN

TIA

- -- 
Yuval Kogman  ( nothingmuch@woobling.org | nothingmuch@altern.org )
kung foo master: /me whallops greyface with a fnord: neeyah!!!!!!!!
et perl hacker. !@# http://nothingmuch.woobling.org/ gpg:0xEBD27418
http://wecanstopspam.org/                    http://www.habeas.com/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (Darwin)
Comment: pgpenvelope 2.10.2 - http://pgpenvelope.sourceforge.net/

t/204-sgfolder.mbox  view on Meta::CPAN

Date: Tue, 15 Jul 2003 04:06:12 +0300 (IDT)
From: Yuval Kojman <lists@woobling.org>
To: mailbox@perl.overmeer.net
Subject: mailbox imap/pop server plans
Message-ID: <correct-message@localhost>
X-PGP-Key: http://nothingmuch.woobling.org/gpg-key-0xEBD27418.asc
X-Habeas-SWE-1: winter into spring
X-Habeas-SWE-2: brightly anticipated
X-Habeas-SWE-3: like Habeas SWE (tm)
X-Habeas-SWE-4: This line is wrong on purpose!!!!
X-Habeas-SWE-5: Sender Warranted Email (SWE) (tm). The sender of this

t/204-sgfolder.mbox  view on Meta::CPAN

TIA

- -- 
Yuval Kogman  ( nothingmuch@woobling.org | nothingmuch@altern.org )
kung foo master: /me whallops greyface with a fnord: neeyah!!!!!!!!
et perl hacker. !@# http://nothingmuch.woobling.org/ gpg:0xEBD27418
http://wecanstopspam.org/                    http://www.habeas.com/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (Darwin)
Comment: pgpenvelope 2.10.2 - http://pgpenvelope.sourceforge.net/

t/204-sgfolder.mbox  view on Meta::CPAN

Date: Tue, 15 Jul 2003 04:06:12 +0300 (IDT)
From: Yuval Kojman <lists@woobling.org>
To: mailbox@perl.overmeer.net
Subject: mailbox imap/pop server plans
Message-ID: <missing-line-4@localhost>
X-PGP-Key: http://nothingmuch.woobling.org/gpg-key-0xEBD27418.asc
X-Habeas-SWE-1: winter into spring
X-Habeas-SWE-2: brightly anticipated
X-Habeas-SWE-3: like Habeas SWE (tm)
X-Habeas-SWE-5: Sender Warranted Email (SWE) (tm). The sender of this
X-Habeas-SWE-6: email in exchange for a license for this Habeas

t/204-sgfolder.mbox  view on Meta::CPAN

TIA

- -- 
Yuval Kogman  ( nothingmuch@woobling.org | nothingmuch@altern.org )
kung foo master: /me whallops greyface with a fnord: neeyah!!!!!!!!
et perl hacker. !@# http://nothingmuch.woobling.org/ gpg:0xEBD27418
http://wecanstopspam.org/                    http://www.habeas.com/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (Darwin)
Comment: pgpenvelope 2.10.2 - http://pgpenvelope.sourceforge.net/

t/204-sgfolder.mbox  view on Meta::CPAN

Date: Tue, 15 Jul 2003 04:06:12 +0300 (IDT)
From: Yuval Kojman <lists@woobling.org>
To: mailbox@perl.overmeer.net
Subject: mailbox imap/pop server plans
Message-ID: <additional-line@localhost>
X-PGP-Key: http://nothingmuch.woobling.org/gpg-key-0xEBD27418.asc
X-Habeas-SWE-1: winter into spring
X-Habeas-SWE-2: brightly anticipated
X-Habeas-SWE-3: like Habeas SWE (tm)
X-Habeas-SWE-4: This line is wrong on purpose!!!!
X-Habeas-SWE-5: Sender Warranted Email (SWE) (tm). The sender of this

t/204-sgfolder.mbox  view on Meta::CPAN

TIA

- -- 
Yuval Kogman  ( nothingmuch@woobling.org | nothingmuch@altern.org )
kung foo master: /me whallops greyface with a fnord: neeyah!!!!!!!!
et perl hacker. !@# http://nothingmuch.woobling.org/ gpg:0xEBD27418
http://wecanstopspam.org/                    http://www.habeas.com/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (Darwin)
Comment: pgpenvelope 2.10.2 - http://pgpenvelope.sourceforge.net/

 view all matches for this distribution


Mail-Postfixadmin

 view release on metacpan or  search on metacpan

lib/Mail/Postfixadmin.pm  view on Meta::CPAN

	$query.="`$self->{'_fields'}->{'mailbox'}->{'password'}`= '$cryptedPassword'";
	if($self->{'storeCleartextPassword'} > 0){
		$query.= ", `$self->{'_fields'}->{'mailbox'}->{'password_clear'}` = '$clearPassword'";
	}
	if($self->{'storeGPGPassword'} > 0){
		my $gpgPassword = $self->cryptPasswordGPG($clearPassword);
		$query.= ", `$self->{'_fields'}->{'mailbox'}->{'password_gpg'}` = '$gpgPassword'";
	}
	$query.="where `$self->{'_fields'}->{'mailbox'}->{'username'}` = '$user'";

	my $sth = $self->{'_dbi'}->prepare($query);
	$sth->execute();

lib/Mail/Postfixadmin.pm  view on Meta::CPAN

				'domain'	=> 'domain',
				'created'	=> 'created',
				'modified'	=> 'modified',
				'active'	=> 'active',
				'password_clear'=> 'password_clear',
				'password_gpg'  => 'password_gpg',
	};
	$fields{'domain_admins'} = {
	                        'domain'        => 'domain',
	                        'username'      => 'username'
	};

 view all matches for this distribution


Mail-RBL

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

any concern to you, by all means verify the signature of this file and
contact the author if any discrepancy is detected.

You can find more information about this at the following URL

             http://mipagina.cantv.net/lem/gpg/

This information includes the correct keys, fingerprints, etc.Note
that this README file should also be signed.

LICENSE AND WARRANTY

 view all matches for this distribution


Mail-Run-Crypt

 view release on metacpan or  search on metacpan

lib/Mail/Run/Crypt.pm  view on Meta::CPAN

        Subject => $subject,
        Data    => $content,
    );

    # Encrypt the MIME object
    my $mgpg = Mail::GnuPG->new(
        key        => $self->{keyid},
        passphrase => $self->{passphrase},
    );

    # Sign and/or encrypt as appropriate
    if ( $self->{sign} and $self->{encrypt} ) {
        $mgpg->mime_signencrypt( $mime, $self->{mailto} );
    }
    elsif ( $self->{sign} ) {
        $mgpg->mime_sign( $mime, $self->{mailto} );
    }
    elsif ( $self->{encrypt} ) {
        $mgpg->mime_encrypt( $mime, $self->{mailto} );
    }

    # Send it
    return $mime->send();
}

 view all matches for this distribution


Mail-SpamAssassin-Plugin-Konfidi

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

t/acceptance-base.pl
t/acceptance.t
t/boilerplate.t
t/config
t/config.dist
t/data/gpg_thunderbird.eml
t/data/plain.eml
t/pod.t
t/SATest.pm
t/test_dir
t/unit.t

 view all matches for this distribution


Mail-SpamAssassin-Plugin-OpenPGP

 view release on metacpan or  search on metacpan

lib/Mail/SpamAssassin/Plugin/OpenPGP.pm  view on Meta::CPAN


=head1 DESCRIPTION

This uses Mail::GPG which uses GnuPG::Interface which uses Gnu Privacy Guard via IPC.

Make sure the homedir you use for gnupg has a gpg.conf with something like the following in it, so that it will automatically fetch public keys.  And make sure that the directory & files are only readable by owner (a gpg security requirement).

 keyserver-options auto-key-retrieve timeout=5
 # any keyserver will do
 keyserver  x-hkp://random.sks.keyserver.penguin.de

If a public key cannot be retrieved, the email will be marked as SIGNED but neither GOOD nor BAD.  To ensure that your local public keys don't get out of date, you should probably set up a scheduled job to delete pubring.gpg regularly

For project information, see L<http://konfidi.org>

=head1 USER SETTINGS

 gpg_executable /path/to/gpg
 gpg_homedir /var/foo/gpg-homedir-for-spamassassin
 openpgp_add_header_fingerprint 1 # default 1 (true)
 openpgp_add_header_failure_info 0 # default 1 (true)

The OpenPGP headers are never added to emails without a signature.

lib/Mail/SpamAssassin/Plugin/OpenPGP.pm  view on Meta::CPAN

  my @cmds = ();

  # see Mail::SpamAssassin::Conf::Parser for expected format of the "config blocks" stored in @cmds

  push(@cmds, {
    setting => 'gpg_homedir', 
    # FIXME: default => 1, 
    type => $Mail::SpamAssassin::Conf::CONF_TYPE_STRING,
  });
  push(@cmds, {
    setting => 'gpg_executable', 
    type => $Mail::SpamAssassin::Conf::CONF_TYPE_STRING,
  });
  push(@cmds, {
    setting => 'openpgp_add_header_fingerprint', 
    default => 1, 

lib/Mail/SpamAssassin/Plugin/OpenPGP.pm  view on Meta::CPAN

    $result =~ s/,.*$//;
    return $result;
}

# TODO contribute back to Mail::GPG::Result
sub _gpg_result_date {
    my $result = shift;
    my $gpg_status = $result->get_gpg_status;
    ## dbg "openpgp: status: " . $$gpg_status;
    # based on Mail::GPG::Result's analyze_result
    pos($$gpg_status) = undef; # reset /g modifier since this module uses the following regex multiple times
    while ( $$gpg_status && $$gpg_status =~ m{^\[GNUPG:\]\s+(.*)$}mg ) {
        my $line = $1;
        ## dbg "openpgp: line: " . $line;
        # 3rd field after VALIDSIG
        if ( $line =~ /^VALIDSIG\s+([^\s]+)\s+([^\s]+)\s+([^\s]+)/ ) {
            #$sign_fingerprint = $1;

lib/Mail/SpamAssassin/Plugin/OpenPGP.pm  view on Meta::CPAN

    }
}

# TODO contribute back to Mail::GPG::Result
# it's get_sign_fingerprint does signing key, not primary key if signing key is a subkey
sub _gpg_result_primary_key_fingerprint {
    my $result = shift;
    my $gpg_status = $result->get_gpg_status;
    pos($$gpg_status) = undef; # reset /g modifier since this module uses the following regex multiple times
    # based on Mail::GPG::Result's analyze_result
    while ( $$gpg_status && $$gpg_status =~ m{^\[GNUPG:\]\s+(.*)$}mg ) {
        my $line = $1;
        # if signed with a subkey, subkey comes first and primary key comes later
        # [GNUPG:] VALIDSIG D1892B5C772E643EBB97397E6737EA5562EFBB73 2008-01-21 1200891462 0 3 0 1 10 01 EAB0FABEDEA81AD4086902FE56F0526F9BB3CE70
        # some gnupg versions may only output 3 fields after VALIDSIG
        # get last 40hex-digit sequence

lib/Mail/SpamAssassin/Plugin/OpenPGP.pm  view on Meta::CPAN

    $scan->{openpgp_signed} = 0;
    $scan->{openpgp_signed_good} = 0;
    $scan->{openpgp_signed_bad} = 0;
    
    my %opts;
    if (defined $scan->{conf}->{gpg_executable}) {
        $opts{gpg_call} = $scan->{conf}->{gpg_executable};
    }
    # see GnuPG::Interface's hash_init (correlates to gpg commandline arguments)
    $opts{gnupg_hash_init} = {
        homedir => $scan->{conf}->{gpg_homedir}
    };
    
    my $gpg = Mail::GPG->new(%opts);
    # TODO: use SA-parsed entity instead of having Mail::GPG reparse it into a MIME::Entity?
    my $entity = Mail::GPG->parse(mail_sref => \$scan->{msg}->get_pristine());
    # TODO: configurable option to use is_signed_quick
	if ($gpg->is_signed(entity => $entity)) {
        $scan->{openpgp_signed} = 1;
        dbg "openpgp: is signed";
    }
	if ($gpg->is_encrypted(entity => $entity)) {
        $scan->{openpgp_encrypted} = 1;
        dbg "openpgp: is encrypted";
    }
    
    if ($scan->{openpgp_signed}) {
        my $result = $gpg->verify(entity => $entity); 
        if (!$result->get_is_signed) {
            warn "openpgp: \$gpg->is_signed != \$result->get_is_signed";
            $scan->{openpgp_signed} = 1;
        } else {
            #dbg "openpgp: " . $result->as_string();
            if (${$result->get_gpg_stdout}) {
                dbg "openpgp: gpg stdout:" . ${$result->get_gpg_stdout};
            }
            if (${$result->get_gpg_stderr}) {
                dbg "openpgp: gpg stderr:" . ${$result->get_gpg_stderr};
            }
            if ($result->get_gpg_rc != 0) {
                my $err = "Error running gpg: " . ${$result->get_gpg_stdout} . ${$result->get_gpg_stderr};
                dbg "openpgp: $err";
                if ($scan->{conf}->{openpgp_add_header_fingerprint}) {
                    $scan->{conf}->{headers_spam}->{'OpenPGP-Failure'} = $err;
                    $scan->{conf}->{headers_ham}->{'OpenPGP-Failure'} = $err;
                }
            } else {
                $scan->{openpgp_fingerprint} = _gpg_result_primary_key_fingerprint($result);
                $scan->{openpgp_signed_good} = $result->get_sign_ok;
                $scan->{openpgp_signed_bad} = !$result->get_sign_ok;
                
                if ($scan->{conf}->{openpgp_add_header_fingerprint}) {
                    $scan->{conf}->{headers_spam}->{'OpenPGP-Fingerprint'} = $scan->{openpgp_fingerprint};
                    $scan->{conf}->{headers_ham}->{'OpenPGP-Fingerprint'} = $scan->{openpgp_fingerprint};
                }
            }
            
            if ($scan->{openpgp_signed_bad}) {
                my $err = "bad signature: " . ${$result->get_gpg_stderr};
                dbg "openpgp: $err";
                if ($scan->{conf}->{openpgp_add_header_fingerprint}) {
                    $scan->{conf}->{headers_spam}->{'OpenPGP-Failure'} = $err;
                    $scan->{conf}->{headers_ham}->{'OpenPGP-Failure'} = $err;
                }

lib/Mail/SpamAssassin/Plugin/OpenPGP.pm  view on Meta::CPAN

                }
            }
            if ($scan->{openpgp_signed_good}) {
                # date of email must be close to that of the signature
                my $sent_date = Mail::SpamAssassin::Util::parse_rfc822_date($scan->get('Date'));
                my $signature_date = _gpg_result_date($result);

                
                # TODO configurable threshold
                my $threshold = 60*60;
                if (abs($sent_date - $signature_date) > $threshold) {

 view all matches for this distribution


Mail-SpamAssassin

 view release on metacpan or  search on metacpan

lib/Mail/SpamAssassin/Util/DependencyInfo.pm  view on Meta::CPAN

       It's only a concern if you are warned about all 3 
       i.e. (curl, wget & fetch) missing";

our @OPTIONAL_BINARIES = (
{
  binary => 'gpg',
  version => '0',
  recommended_min_version => '1.0.6',
  version_check_params => '--version',
  version_check_regex => 'gpg \(GnuPG\) ([\d\.]*)',
  desc => 'The "sa-update" program requires this executable to verify  
  encryption signatures.  It is not recommended, but you can use 
  "sa-update" with the --no-gpg to skip the verification. ',
},
{
  binary => 'wget',
  version => '0',
  recommended_min_version => '1.8.2',

 view all matches for this distribution


Mail-SpamCannibal

 view release on metacpan or  search on metacpan

lib/Mail/SpamCannibal/GoodPrivacy.pm  view on Meta::CPAN

wrapper around 'pgp2x', 'pgp6x', or 'gnupg'
that provides encryption and decryption for
IPTable::IPv4::DBTables::SpamCannibal.

Mail::SpamCannibal::GoodPrivacy has been tested using pgp-2.6.2g, pgp-6.5.8,
and gpg-1.2.2 on RSA keys generated by pgp-2.6.2g which are included with
this distribution.

Utilities to verify that a message has PGP encrypted content prior to
decryption so that plain text messages are not inadvertently passed to the
decrypt program;

lib/Mail/SpamCannibal/GoodPrivacy.pm  view on Meta::CPAN

  input:	a hash or hash pointer
  return:	plaintext or '' on error

  %hash = (
	Data	  => $data,
	ExeFile	  => '/usr/local/bin/gpg',
	KeyPath	  => './',
	Password  => 'sometext',
	UserID	  => '',
	Version	  => '',
  );

    Data:	data to decrypt

    ExeFile:	location of executable
	i.e.	/usr/local/bin/pgp
		/usr/local/bin/gpg

	WARNING: use appropriate default
		 keyring names.

    KeyPath:    directory for keyrings

lib/Mail/SpamCannibal/GoodPrivacy.pm  view on Meta::CPAN

	i.e. 	'test' or

		E56C91B9 as displayed by
		pgp -kv ./keyrings/secring.pgp
		  or
		ENVGPGHOME=./keyrings gpg --list-secret-keys

    Version:	Version compliance (gpg only)
		(none) for standard gpg,
		2.6x and 6.x for pgp support

=cut

## test the input array

lib/Mail/SpamCannibal/GoodPrivacy.pm  view on Meta::CPAN

  if ($pgpcmd =~ m|/pgp[^/]*$|) {
    $pgpcmd .= ' -f +batchmode +force 2>/dev/null';
    $ENV{PGPPATH} = $me->{KeyPath};
    $ENV{PGPPASS} = $me->{Password};
  }
  elsif( $pgpcmd =~ m|/gpg[^/]*$|) {
    $data .= $me->{Password}."\n";
    $pgpcmd .= ' --pgp2' if $me->{Version} =~ /^2\./;
    $pgpcmd .= ' --pgp6' if $me->{Version} =~ /^6\./;
    $pgpcmd .= ' --decrypt --batch --passphrase-fd 0 2>/dev/null';
    $ENV{GNUPGHOME} = $me->{KeyPath};
  }
  else {
    die "could not find pgp or gpg executable\n";
  }

  $data .= $me->{Data};

  my $rv = '';

lib/Mail/SpamCannibal/GoodPrivacy.pm  view on Meta::CPAN


=item NOTE:	in all cases the default key file required.

	PGP 2.6.x	pubring.pgp, secring.pgp
	PGP 6.5.8	pubring.pkr, secring.skr
	GnuPG		pubring.gpg, secring.gpg

=back

=head1 EXPORT_OK

 view all matches for this distribution


Mail-Toaster

 view release on metacpan or  search on metacpan

bin/install_deps.pl  view on Meta::CPAN

  'cache_metadata' => q[1],
  'cpan_home' => qq[$ENV{HOME}/.cpan],
  'ftp' => $ftp,
  'ftp_proxy' => q[],
  'getcwd' => q[cwd],
  'gpg' => q[],
  'gzip' => $gzip,
  'histfile' => qq[$ENV{HOME}/.cpan/histfile],
  'histsize' => q[100],
  'http_proxy' => q[],
  'inactivity_timeout' => q[5],

 view all matches for this distribution


Math-BaseCalc

 view release on metacpan or  search on metacpan

SIGNATURE  view on Meta::CPAN

SHA1 3f74c39bb9c8b903b962282f1fccc06daa89d877 t/05-trans.t
SHA1 7f5b34ec98977e2eae7ab0cd530a16f726fc33a2 t/06_digit_dot.t
SHA1 19e797985fada8c25f13ce5f0fb873999c3cbe44 t/99_podcoverage.t
SHA1 fa45d6e6ab1cd421349dea4ef527bfd5cdc8a09e t/author-critic.t
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org

iF0EARECAB0WIQSty9sFtA6yoqVVVGKCu8wEt++UdgUCWTjgQAAKCRCCu8wEt++U
dvQ7AJ9RNWjwwDc3W6AcEjd4czwCvYKKeQCcCCYaV9O4XnQR/RCYmebPHBbU4O4=
=4ZyA
-----END PGP SIGNATURE-----

 view all matches for this distribution


Math-BigInt-Pari

 view release on metacpan or  search on metacpan

SIGNATURE  view on Meta::CPAN

SHA256 334ef06155ec886e4592639219b0227e330d969019a9ac25e0c633e4be1b38f3 xt/release/unused-vars.t
SHA256 79e228dfe3193c0f2b5f9afaa6677062ef33ac9c9578e0e6c5a627696c319982 xt/release/version.t
-----BEGIN PGP SIGNATURE-----

iQEzBAEBAwAdFiEETKm/EiRoNYMVDAUYZyY+XZ+vXroFAmfjvIQACgkQZyY+XZ+v
XrrQjQgAzRFAlfzI2Bprrqy1kJ5urXgpgQNDztML4+tv7Vg3GvEblEBDURB/qPyb
rAS0wDtc9HGwq3Mmkpu88jnD02ei9WaWH7Ra0gzjeFQVRkwF7PQlC+dPeh1WXO6h
wK36oG4OnebVwsU+SjiGCpnd9spnJwAJ5PY4wfYMwTzzuzyk+bzFa1y82OWCaFix
Y8KtCqI8fMjXawQQMXYytfIDUzTRmMXURDFz/r/OWWPtdGL/nkeYLGDSPb3Vo/vi
4E+MZKR2UuMa2w2SyOvsoETChsUTyNX/DWWBa1/iY0FnFUdtSDzVM/c7XzjL+3Pt
/vTiwLz+O/Fg8Ad2itVFNLKLpNDJOA==

 view all matches for this distribution


Math-NumSeq-Alpha

 view release on metacpan or  search on metacpan

xtools/my-kwalitee.sh  view on Meta::CPAN

if test -z "$DISTVNAME"; then
  echo "DISTVNAME not found"
  exit 1
fi

if [ -e ~/bin/my-gpg-agent-daemon ]; then
  eval `my-gpg-agent-daemon`
  echo "gpg-agent $GPG_AGENT_INFO"
fi

TGZ="$DISTVNAME.tar.gz"
make "$TGZ"

 view all matches for this distribution


Math-NumSeq

 view release on metacpan or  search on metacpan

xtools/my-kwalitee.sh  view on Meta::CPAN

if test -z "$DISTVNAME"; then
  echo "DISTVNAME not found"
  exit 1
fi

if [ -e ~/bin/my-gpg-agent-daemon ]; then
  eval `my-gpg-agent-daemon`
  echo "gpg-agent $GPG_AGENT_INFO"
fi

TGZ="$DISTVNAME.tar.gz"
make "$TGZ"

 view all matches for this distribution


Math-PlanePath

 view release on metacpan or  search on metacpan

xtools/my-kwalitee.sh  view on Meta::CPAN

if test -z "$DISTVNAME"; then
  echo "DISTVNAME not found"
  exit 1
fi

if [ -e ~/bin/my-gpg-agent-daemon ]; then
  eval `my-gpg-agent-daemon`
  echo "gpg-agent $GPG_AGENT_INFO"
fi

TGZ="$DISTVNAME.tar.gz"
make "$TGZ"

 view all matches for this distribution


Matplotlib-Simple

 view release on metacpan or  search on metacpan

t/output.images/imshow.multiple.svg  view on Meta::CPAN

z
" style="fill: #ffffff"/>
   </g>
   <g clip-path="url(#pfd7f11e238)">
    <image xlink:href="data:image/png;base64,
iVBORw0KGgoAAAANSUhEUgAAA48AAANKCAYAAAAqTHsIAAEAAElEQVR4nOy92brkqM4FKPbJB+kH7ot+4T/VF0bS0gTYEXvIrFR9ldsBmsA2YlkYj//n//t/mf7RP/pH/+gf/aN/9I/+0T/6R//oH/2jBf2i8d0u/KP/NP17dJHpX5/8o2+gQfTv2vtHJfG/ecI/+g76d91l+tcn/+gH0K9/QeGifxOnb6JB//r9HyX6dz9+E/3r838UaR...
   </g>
   <g id="matplotlib.axis_1">
    <g id="xtick_1">
     <g id="line2d_1">
      <defs>

t/output.images/imshow.multiple.svg  view on Meta::CPAN

z
" style="fill: #ffffff"/>
   </g>
   <g clip-path="url(#p2f8affbbdf)">
    <image xlink:href="data:image/png;base64,
iVBORw0KGgoAAAANSUhEUgAAA48AAANKCAYAAAAqTHsIAAEAAElEQVR4nOy92brkqM4FKPbJB+kH7ot+4T/VF0bS0gTYEXvIrFR9ldsBmsA2YlkYj//n//t/mf7RP/pH/+gf/aN/9I/+0T/6R//oH/2jBf2i8d0u/KP/NP17dJHpX5/8o2+gQfTv2vtHJfG/ecI/+g76d91l+tcn/+gH0K9/QeGifxOnb6JB//r9HyX6dz9+E/3r838UaR...
   </g>
   <g id="matplotlib.axis_3">
    <g id="xtick_9">
     <g id="line2d_17">
      <g>

t/output.images/imshow.multiple.svg  view on Meta::CPAN

z
" style="fill: #ffffff"/>
   </g>
   <g clip-path="url(#pf43a3efc33)">
    <image xlink:href="data:image/png;base64,
iVBORw0KGgoAAAANSUhEUgAAA48AAANKCAYAAAAqTHsIAAEAAElEQVR4nOy92brkqM4FKPbJB+kH7ot+4T/VF0bS0gTYEXvIrFR9ldsBmsA2YlkYj//n//t/mf7RP/pH/+gf/aN/9I/+0T/6R//oH/2jBf2i8d0u/KP/NP17dJHpX5/8o2+gQfTv2vtHJfG/ecI/+g76d91l+tcn/+gH0K9/QeGifxOnb6JB//r9HyX6dz9+E/3r838UaR...
   </g>
   <g id="matplotlib.axis_5">
    <g id="xtick_17">
     <g id="line2d_33">
      <g>

t/output.images/imshow.multiple.svg  view on Meta::CPAN

z
" style="fill: #ffffff"/>
   </g>
   <g clip-path="url(#p6e2be4edaa)">
    <image xlink:href="data:image/png;base64,
iVBORw0KGgoAAAANSUhEUgAAA48AAANKCAYAAAAqTHsIAAEAAElEQVR4nOy92brkqM4FKPbJB+kH7ot+4T/VF0bS0gTYEXvIrFR9ldsBmsA2YlkYj//n//t/mf7RP/pH/+gf/aN/9I/+0T/6R//oH/2jBf2i8d0u/KP/NP17dJHpX5/8o2+gQfTv2vtHJfG/ecI/+g76d91l+tcn/+gH0K9/QeGifxOnb6JB//r9HyX6dz9+E/3r838UaR...
   </g>
   <g id="matplotlib.axis_7">
    <g id="xtick_25">
     <g id="line2d_49">
      <g>

 view all matches for this distribution


Mediawiki-POD

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

=item *

Get my key from http://bloodgate.com/tels.asc, import it into
GnuPG with:

	gpg --import tels.asc

You may also let the C<cpansign> utility fetch it automatically
from a keyserver, if that works for you.

=item *

 view all matches for this distribution


Meta

 view release on metacpan or  search on metacpan

Meta/Baseline/base_aegi_backup.pl  view on Meta::CPAN

}
Meta::Utils::Output::verbose($verb,"finished tarring\n");
$scod=$tar->write($dirf."/".$tarf);
if($enc) {
#	my($author)=Meta::Info::Author->new_modu($author_file);
#	my($enc_file)=$dirf."/".$tarf.".gpg";
#	my($gpg)=GnuPG->new();
#	Meta::Utils::Output::verbose($verb,"started encrypting\n");
#	$gpg->encrypt(
#		plaintext=>$dirf."/".$tarf,
#		output=>$enc_file,
#		recipient=>$author->get_default_email(),
#		armor=>$armor,
#		sign=>$sign,

Meta/Baseline/base_aegi_backup.pl  view on Meta::CPAN

#	Meta::Utils::Output::verbose($verb,"finished encrypting\n");
#	if($send) {
#		Meta::Utils::Output::verbose($verb,"started sending\n");
#		my($user)=$author->get_sourceforge_user();
#		my($host)=$author->get_sourceforge_ssh();
#		my($addr)=$user."@".$host.":".$remote_dir."/".$tarf.".gpg";
#		Meta::Utils::Output::verbose($verb,"addr is [".$addr."]\n");
#		my($scp)=Net::SCP->new($host,$user);
#		my($res)=$scp->scp($enc_file,$addr);
#		Meta::Utils::Output::verbose($verb,"res is [".$res."]\n");
#		if(!$res) {

 view all matches for this distribution


Metabrik-Repository

 view release on metacpan or  search on metacpan

lib/Metabrik/Crypto/Gpg.pm  view on Meta::CPAN

#
# $Id$
#
# crypto::gpg Brik
#
package Metabrik::Crypto::Gpg;
use strict;
use warnings;

lib/Metabrik/Crypto/Gpg.pm  view on Meta::CPAN

      revision => '$Revision$',
      tags => [ qw(unstable pgp gnupg) ],
      author => 'GomoR <GomoR[at]metabrik.org>',
      license => 'http://opensource.org/licenses/BSD-3-Clause',
      attributes => {
         public_keyring => [ qw(file.gpg) ],
         secret_keyring => [ qw(file.gpg) ],
         passphrase => [ qw(passphrase) ],
         type_key => [ qw(RSA|DSA) ],
         type_subkey => [ qw(RSA|ELG-E) ],
         length_key => [ qw(1024|2048|3072|4096) ],
         length_subkey => [ qw(1024|2048|3072|4096) ],
         expire_key => [ qw(count_y|0) ],
         _gnupg => [ qw(INTERNAL) ],
      },
      attributes_default => {
         public_keyring => $ENV{HOME}."/.gnupg/pubring.gpg",
         secret_keyring =>  $ENV{HOME}."/.gnupg/secring.gpg",
         type_key => 'DSA',
         type_subkey => 'ELG-E',
         length_key => 2048,
         length_subkey => 3072,
         expire_key => '5y',

lib/Metabrik/Crypto/Gpg.pm  view on Meta::CPAN


__END__

=head1 NAME

Metabrik::Crypto::Gpg - crypto::gpg Brik

=head1 COPYRIGHT AND LICENSE

Copyright (c) 2014-2022, Patrice E<lt>GomoRE<gt> Auffret

 view all matches for this distribution


Method-Signatures-WithDocumentation

 view release on metacpan or  search on metacpan

SIGNATURE  view on Meta::CPAN

SHA1 d8a904a35375aca0e02c9150fb1945c53bdeb7e0 t/release-kwalitee.t
SHA1 5cf386f49901e8ccaad5ab271036754d67114081 t/release-pod-coverage.t
SHA1 dc3eefcab3399f9a70861c332bb4a81ddcbb45e4 t/release-pod-syntax.t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBAgAGBQJVONtWAAoJEHwWRyBU62lqGfsQAIiFHRdp/kKapmMAIGRjkDiZ
6pj1e2QKwLwadE0oypPVDr74bhC+/oWPfv6r72gUm79syHSoF/Uosoqmy7bO3Fy5
FS1GdBqJTV+hOpaGkTjobHpcUAf09+MNMf/G6JW06sHBAPcmlOoeQVBBTo/Mwf2k
POLjWsaPWypFYizZW0h011IBJKNxsrcLwOZpAWt5T4FjeR35i2UbA/5ziRmONh+T

 view all matches for this distribution


Method-Signatures

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

    * Remove spurious error for modifiers in roles [github #36]


20110923.1726  Fri Sep 23 17:27:47 PDT 2011
    Distribution Fixes
    * 20110923 had a bad signature file because gpg is broken on my laptop.
      Releasing without a signature.  1 aM n0t A hax0r!!!1!1!


20110923  Fri Sep 23 16:13:46 PDT 2011  [It Takes All Types]
    Incompatible Changes

 view all matches for this distribution


Module-Release-VerifyGPGSignature

 view release on metacpan or  search on metacpan

lib/Module/Release/VerifyGPGSignature.pm  view on Meta::CPAN


use warnings;
no warnings;
use Exporter qw(import);

our @EXPORT = qw(check_all_gpg_signatures check_gpg_signature);

our $VERSION = '0.002';

=encoding utf8

lib/Module/Release/VerifyGPGSignature.pm  view on Meta::CPAN


=head1 DESCRIPTION

Configure in F<.releaserc> as a list of pairs:

    gpg_signatures \
    	file.txt file.txt.gpg \
    	file2.txt file2.txt.gpg

=over 4

=cut

lib/Module/Release/VerifyGPGSignature.pm  view on Meta::CPAN

	push @pairs, [ @$args ] if @$args;

	\@pairs
	}

sub _key ( $self ) { 'gpg_signatures' }

=item * check_all_gpg_signatures

Go through all files and signature files listed in the C<gpg_signatures>
and verify that the signatures match.

=cut

sub check_all_gpg_signatures ( $self ) {
	my $pairs = $self->_get_file_pairs;
	foreach my $pair ( $pairs->@* ) {
		$self->check_gpg_signature( $pair->@* )
		}
	return 1;
	}

=item * check_gpg_signature( FILE, SIGNATURE_FILE )

Checks the PGP signature in SIGNATURE_FILE matches for FILE.

=cut

sub check_gpg_signature ( $self, $file, $signature_file ) {
	$self->_print( "Checking GPG signature of <$file>...\n" );

	$self->_die( "\nERROR: Could not verify signature of <$file>: file does not exist\n" )
		unless -e $file;

	$self->_die( "\nERROR: Could not verify signature of <$file> with <$signature_file>: signature file does not exist\n" )
		unless -e $signature_file;

	my $result = $self->run( qq(gpg --verify "$signature_file" "$file" 2>&1) );
	$result =~ s/^/    /mg;
	$self->_print( "$result" );

	unless( $result =~ /\bGood signature from\b/ ) {
		$self->_die( "\nERROR: signature verification failed" );

lib/Module/Release/VerifyGPGSignature.pm  view on Meta::CPAN


=head1 SOURCE AVAILABILITY

This source is in Github:

	http://github.com/briandfoy/module-release-verifygpgsignature

=head1 AUTHOR

brian d foy, C<< <brian d foy> >>

 view all matches for this distribution


Module-Release

 view release on metacpan or  search on metacpan

script/release  view on Meta::CPAN

If there are modified files, added files, or extra files so that
source control complains, fail.

=item Check that any GPG signatures are correct

If C<gpg_signatures> is present in the config, load
L<Module::Release::VerifyGPGSignature> and verify the configured
signatures.

=item Upload to PAUSE

script/release  view on Meta::CPAN


$release->_debug( "dist version is <$Version>\n" );

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# check anything signed by GPG
if( $release->config->gpg_signatures ) {
	$release->_print("============ Checking GPG signatures\n");
	$release->load_mixin('Module::Release::VerifyGPGSignature');
	$release->check_all_gpg_signatures;
	}


# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# test with a bunch of perls

 view all matches for this distribution


( run in 2.152 seconds using v1.01-cache-2.11-cpan-1191d43216d )