Chooser

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN


WriteMakefile(
			  NAME                => 'Chooser',
			  AUTHOR              => 'Zane C. Bowers <vvelox@vvelox.net>',
			  VERSION_FROM        => 'lib/Chooser.pm',
			  ABSTRACT_FROM       => 'lib/Chooser.pm',
			  PL_FILES            => {},
			  INST_SCRIPT => 'bin',
			  PREREQ_PM => {
							'Test::More' => 0,
							'IO::Socket::SSL'=>0,
							'Sys::Hostname'=>0,
							'Text::NeatTemplate'=>0,
							},
			  dist                => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
			  clean               => { FILES => 'Chooser-*' },
			  );

lib/Chooser.pm  view on Meta::CPAN

package Chooser;

use warnings;
use strict;
use Exporter;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
use IO::Socket::SSL;
use Sys::Hostname;
use Text::NeatTemplate;

our @ISA         = qw(Exporter);
our @EXPORT      = qw(choose);
our @EXPORT_OK   = qw(choose);
our %EXPORT_TAGS = (DEFAULT => [qw(choose)]);

sub argstohash{
	my $argsString=$_[0];

lib/Chooser.pm  view on Meta::CPAN

		$iflistInt++;
	}

	return "0";
}

#handles the the sslcert test
sub sslcert{
	my %args=%{$_[0]};

	my $client=IO::Socket::SSL->new( $args{host}.':'.$args{port},
									 SSL_version=>$args{version},
									 SSL_cipher_list=>$args{cipher_list},
									 SSL_ca_file=>$args{ca_file},
									 SSL_ca_path=>$args{ca_path},
									 SSL_crl_file=>$args{crl_file},
									 SSL_verify_mode=>$args{verify_mode},
									 SSL_verifycn_name=>$args{verifycn_name},
									 SSL_verifycn_scheme=>$args{verifycn_scheme},
									);

lib/Chooser.pm  view on Meta::CPAN


The MAC to check for.

=head2 sslcert

=head3 args

To get the values to for the subject and issure, use the
code below and use everything after /\: /.

    use IO::Socket::SSL;
    my $client->new($host.':'.$port);
    print $client->dump_peer_certificate;

The required values are listed below.

    host
    port
    subject

For more information about most of these options, please
see the documentation for IO::Socket::SSL for the new
method.

=head4 CAfile

The CA file to use.

=head4 CApath

CA path to use.



( run in 0.473 second using v1.01-cache-2.11-cpan-4d50c553e7e )