Result:
found more than 625 distributions - search limited to the first 2001 files matching your query ( run in 2.451 )


HTTP-Request-FromCurl

 view release on metacpan or  search on metacpan

lib/HTTP/Request/CurlParameters.pm  view on Meta::CPAN

    if( my $p = $init_cookie_jar->{preamble}) {
        push @preamble, @{$p}
    };

    if( $self->insecure ) {
        push @preamble, 'use IO::Socket::SSL;';
        $ssl_options{ SSL_verify_mode } = \'IO::Socket::SSL::SSL_VERIFY_NONE';
        $ssl_options{ SSL_hostname    } = '';
        $ssl_options{ verify_hostname } = '';
    };

    if( $self->cert ) {
        push @preamble, 'use IO::Socket::SSL;';
        $ssl_options{ SSL_ca_file } = $self->cert;
    };
    if( $self->capath ) {
        push @preamble, 'use IO::Socket::SSL;';
        $ssl_options{ SSL_ca_path } = $self->capath;
    };
    my $constructor_args = join ",",
                           $self->_pairlist([
                                     send_te => 0,

lib/HTTP/Request/CurlParameters.pm  view on Meta::CPAN

    if( $self->insecure ) {
    } else {
        push @ssl, verify_SSL => 1;
    };
    if( $self->cert ) {
        push @preamble, 'use IO::Socket::SSL;';
        $ssl_options{ SSL_cert_file } = $self->cert;
    };
    if( $self->show_error ) {
        push @postamble,
            '    die $res->{reason} if !$res->{success};',

 view all matches for this distribution


HTTP-Server-Brick

 view release on metacpan or  search on metacpan

t/serving.t  view on Meta::CPAN


run_tests( ssl => 0, fork => 0 );
run_tests( ssl => 0, fork => 1 );

SKIP: {
  skip "can't run SSL tests without HTTP::Daemon::SSL and IO::Socket::SSL",
    TEST_GROUP * 2
    unless eval "require HTTP::Daemon::SSL; require IO::Socket::SSL; 1";
  run_tests( ssl => 1, fork => 0 );
  run_tests( ssl => 1, fork => 1 );
}

sub test_url {

 view all matches for this distribution


HTTP-Server-Simple

 view release on metacpan or  search on metacpan

lib/HTTP/Server/Simple.pm  view on Meta::CPAN

        my $fh   = $self->stdio_handle;

        $self->SUPER::accept_hook(@_);

        my $newfh =
        IO::Socket::SSL->start_SSL( $fh, 
            SSL_server    => 1,
            SSL_use_cert  => 1,
            SSL_cert_file => 'myserver.crt',
            SSL_key_file  => 'myserver.key',
        )
        or warn "problem setting up SSL socket: " . IO::Socket::SSL::errstr();

        $self->stdio_handle($newfh) if $newfh;
    }

=head2 post_setup_hook

 view all matches for this distribution


HTTP-Simple

 view release on metacpan or  search on metacpan

lib/HTTP/Simple.pm  view on Meta::CPAN

This module is a wrapper of L<HTTP::Tiny> that provides simplified functions
for performing HTTP requests in a similar manner to L<LWP::Simple>, but with
slightly more useful error handling. For full control of the request process
and response handling, use L<HTTP::Tiny> directly.

L<IO::Socket::SSL> is required for HTTPS requests with L<HTTP::Tiny>.

Request methods that return the body content of the response will return a byte
string suitable for directly printing, but that may need to be
L<decoded|Encode/decode> for text operations.

 view all matches for this distribution


HTTP-SimpleLinkChecker

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

         }
      },
      "runtime" : {
         "requires" : {
            "HTTP::Status" : "0",
            "IO::Socket::SSL" : "1.94",
            "Mojo::UserAgent" : "0",
            "Mojolicious" : "4.50",
            "perl" : "5.010"
         }
      },

 view all matches for this distribution


HTTP-Tiny-SPDY

 view release on metacpan or  search on metacpan

lib/HTTP/Tiny/SPDY.pm  view on Meta::CPAN

sub connect {
    @_ == 4 || die(q/Usage: $handle->connect(scheme, host, port)/ . "\n");
    my ($self, $scheme, $host, $port) = @_;
 
    if ( $scheme eq 'https' ) {
        # Need IO::Socket::SSL 1.42 for SSL_create_ctx_callback
        die(qq/IO::Socket::SSL 1.42 must be installed for https support\n/)
            unless eval {require IO::Socket::SSL; IO::Socket::SSL->VERSION(1.42)};
        # Need Net::SSLeay 1.49 for MODE_AUTO_RETRY
        die(qq/Net::SSLeay 1.49 must be installed for https support\n/)
            unless eval {require Net::SSLeay; Net::SSLeay->VERSION(1.49)};
    }
    elsif ( $scheme ne 'http' ) {

 view all matches for this distribution


HTTP-Tiny-UA

 view release on metacpan or  search on metacpan

lib/HTTP/Tiny/UA.pm  view on Meta::CPAN

#pod Request timeout in seconds (default is 60)
#pod * C<verify_SSL>
#pod A boolean that indicates whether to validate the SSL certificate of an C<https>
#pod connection (default is false)
#pod * C<SSL_options>
#pod A hashref of C<SSL_*> options to pass through to L<IO::Socket::SSL>
#pod
#pod See L<SSL SUPPORT in HTTP::Tiny|HTTP::Tiny/SSL SUPPORT> for more on the
#pod C<verify_SSL> and C<SSL_options> attributes.
#pod
#pod =method get|head|put|post|post_form|mirror|delete

lib/HTTP/Tiny/UA.pm  view on Meta::CPAN


=item *

C<SSL_options>

A hashref of C<SSL_*> options to pass through to L<IO::Socket::SSL>

=back

See L<SSL SUPPORT in HTTP::Tiny|HTTP::Tiny/SSL SUPPORT> for more on the
C<verify_SSL> and C<SSL_options> attributes.

 view all matches for this distribution


HTTP-Tiny

 view release on metacpan or  search on metacpan

lib/HTTP/Tiny.pm  view on Meta::CPAN

#pod   will be 599.
#pod * C<verify_SSL> — A boolean that indicates whether to validate the TLS/SSL
#pod   certificate of an C<https> — connection (default is true). Changed from false
#pod   to true in version 0.083.
#pod * C<SSL_options> — A hashref of C<SSL_*> — options to pass through to
#pod   L<IO::Socket::SSL>
#pod * C<$ENV{PERL_HTTP_TINY_SSL_INSECURE_BY_DEFAULT}> - Changes the default
#pod   certificate verification behavior to not check server identity if set to 1.
#pod   Only effective if C<verify_SSL> is not set. Added in version 0.083.
#pod
#pod

lib/HTTP/Tiny.pm  view on Meta::CPAN

#pod     $ok         = HTTP::Tiny->can_ssl;
#pod     ($ok, $why) = HTTP::Tiny->can_ssl;
#pod     ($ok, $why) = $http->can_ssl;
#pod
#pod Indicates if SSL support is available.  When called as a class object, it
#pod checks for the correct version of L<Net::SSLeay> and L<IO::Socket::SSL>.
#pod When called as an object methods, if C<SSL_verify> is true or if C<SSL_verify_mode>
#pod is set in C<SSL_options>, it checks that a CA file is available.
#pod
#pod In scalar context, returns a boolean indicating if SSL is available.
#pod In list context, returns the boolean and a (possibly multi-line) string of

lib/HTTP/Tiny.pm  view on Meta::CPAN

sub can_ssl {
    my ($self) = @_;

    my($ok, $reason) = (1, '');

    # Need IO::Socket::SSL 1.968 for default_ca()
    local @INC = @INC;
    pop @INC if $INC[-1] eq '.';
    unless (eval {require IO::Socket::SSL; IO::Socket::SSL->VERSION(1.968)}) {
        $ok = 0;
        $reason .= qq/IO::Socket::SSL 1.968 or later must be installed for https support\n/;
    }

    # Need Net::SSLeay 1.49 for MODE_AUTO_RETRY
    unless (eval {require Net::SSLeay; Net::SSLeay->VERSION(1.49)}) {
        $ok = 0;

lib/HTTP/Tiny.pm  view on Meta::CPAN

    my ($self, $host) = @_;

    # As this might be used via CONNECT after an SSL session
    # to a proxy, we shut down any existing SSL before attempting
    # the handshake
    if ( ref($self->{fh}) eq 'IO::Socket::SSL' ) {
        unless ( $self->{fh}->stop_SSL ) {
            my $ssl_err = IO::Socket::SSL->errstr;
            die(qq/Error halting prior SSL connection: $ssl_err/);
        }
    }

    my $ssl_args = $self->_ssl_args($host);
    IO::Socket::SSL->start_SSL(
        $self->{fh},
        %$ssl_args,
        SSL_create_ctx_callback => sub {
            my $ctx = shift;
            Net::SSLeay::CTX_set_mode($ctx, Net::SSLeay::MODE_AUTO_RETRY());
        },
    );

    unless ( ref($self->{fh}) eq 'IO::Socket::SSL' ) {
        my $ssl_err = IO::Socket::SSL->errstr;
        die(qq/SSL connection failed for $host: $ssl_err\n/);
    }
}

sub close {

lib/HTTP/Tiny.pm  view on Meta::CPAN

}

sub can_read {
    @_ == 1 || @_ == 2 || die(q/Usage: $handle->can_read([timeout])/ . "\n");
    my $self = shift;
    if ( ref($self->{fh}) eq 'IO::Socket::SSL' ) {
        return 1 if $self->{fh}->pending;
    }
    return $self->_do_timeout('read', @_)
}

lib/HTTP/Tiny.pm  view on Meta::CPAN

            die qq/SSL_ca_file '$ca_file' not found or not readable\n/;
        }
        return ( SSL_ca_file => $ca_file );
    }

    # Return default_ca() parameters from IO::Socket::SSL. It looks for the
    # default bundle and directory from Net::SSLeay, handles $ENV{SSL_CERT_FILE}
    # and $ENV{SSL_CERT_DIR}, and finally fails over to Mozilla::CA
    #
    my %default_ca = IO::Socket::SSL::default_ca();
    return %default_ca if %default_ca;

    # If IO::Socket::SSL::default_ca() was unable to find a CA bundle, look for
    # one in well known locations as a last resort. Cert list copied from golang
    # src/crypto/x509/root_unix.go
    #
    foreach my $ca_bundle (
        "/etc/ssl/certs/ca-certificates.crt",     # Debian/Ubuntu/Gentoo etc.

lib/HTTP/Tiny.pm  view on Meta::CPAN

sub _ssl_args {
    my ($self, $host) = @_;

    my %ssl_args;

    # This test reimplements IO::Socket::SSL::can_client_sni(), which wasn't
    # added until IO::Socket::SSL 1.84
    if ( Net::SSLeay::OPENSSL_VERSION_NUMBER() >= 0x01000000 ) {
        $ssl_args{SSL_hostname} = $host,          # Sane SNI support
    }

    if ($self->{verify_SSL}) {

lib/HTTP/Tiny.pm  view on Meta::CPAN


C<verify_SSL> — A boolean that indicates whether to validate the TLS/SSL certificate of an C<https> — connection (default is true). Changed from false to true in version 0.083.

=item *

C<SSL_options> — A hashref of C<SSL_*> — options to pass through to L<IO::Socket::SSL>

=item *

C<$ENV{PERL_HTTP_TINY_SSL_INSECURE_BY_DEFAULT}> - Changes the default certificate verification behavior to not check server identity if set to 1. Only effective if C<verify_SSL> is not set. Added in version 0.083.

lib/HTTP/Tiny.pm  view on Meta::CPAN

    $ok         = HTTP::Tiny->can_ssl;
    ($ok, $why) = HTTP::Tiny->can_ssl;
    ($ok, $why) = $http->can_ssl;

Indicates if SSL support is available.  When called as a class object, it
checks for the correct version of L<Net::SSLeay> and L<IO::Socket::SSL>.
When called as an object methods, if C<SSL_verify> is true or if C<SSL_verify_mode>
is set in C<SSL_options>, it checks that a CA file is available.

In scalar context, returns a boolean indicating if SSL is available.
In list context, returns the boolean and a (possibly multi-line) string of

lib/HTTP/Tiny.pm  view on Meta::CPAN

timeout
verify_SSL

=head1 TLS/SSL SUPPORT

Direct C<https> connections are supported only if L<IO::Socket::SSL> 1.56 or
greater and L<Net::SSLeay> 1.49 or greater are installed. An error will occur
if new enough versions of these modules are not installed or if the TLS
encryption fails. You can also use C<HTTP::Tiny::can_ssl()> utility function
that returns boolean to see if the required modules are installed.

lib/HTTP/Tiny.pm  view on Meta::CPAN

attacks|http://en.wikipedia.org/wiki/Machine-in-the-middle_attack>.

Certificate verification requires a file or directory containing trusted CA
certificates.

C<IO::Socket::SSL::default_ca()> is called to detect the default location of
your CA certificates. This also supports the environment variables
C<SSL_CERT_FILE> and C<SSL_CERT_DIR>, and will fail over to L<Mozilla::CA> if no
certs are found.

If C<IO::Socket::SSL::default_ca()> is not able to find usable CA certificates,
HTTP::Tiny will search several well-known system-specific default locations for
a CA certificate file as a last resort:

=over 4

lib/HTTP/Tiny.pm  view on Meta::CPAN

An error will be occur if C<verify_SSL> is true and no CA certificate file
is available.

If you desire complete control over TLS/SSL connections, the C<SSL_options>
attribute lets you provide a hash reference that will be passed through to
C<IO::Socket::SSL::start_SSL()>, overriding any options set by HTTP::Tiny. For
example, to provide your own trusted CA file:

    SSL_options => {
        SSL_ca_file => $file_path,
    }

The C<SSL_options> attribute could also be used for such things as providing a
client certificate for authentication to a server or controlling the choice of
cipher used for the TLS/SSL connection. See L<IO::Socket::SSL> documentation for
details.

=head1 PROXY SUPPORT

HTTP::Tiny can proxy both C<http> and C<https> requests.  Only Basic proxy

lib/HTTP/Tiny.pm  view on Meta::CPAN


L<IO::Socket::IP> - Required for IPv6 support

=item *

L<IO::Socket::SSL> - Required for SSL support

=item *

L<LWP::UserAgent> - If HTTP::Tiny isn't enough for you, this is the "standard" way to do things

 view all matches for this distribution


HTTP-Tinyish

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

         }
      },
      "develop" : {
         "requires" : {
            "Dist::Milla" : "v1.0.22",
            "IO::Socket::SSL" : "1.42",
            "LWP" : "6",
            "LWP::Protocol::https" : "6",
            "Mozilla::CA" : "0",
            "Net::SSLeay" : "1.49",
            "Test::Pod" : "1.41"

 view all matches for this distribution


HTTP-WebTest

 view release on metacpan or  search on metacpan

INSTALL  view on Meta::CPAN

* Time::HiRes (is included in Perl 5.8.0 and later)

If you want SSL support you need one of these modules

* Crypt::SSLeay
* IO::Socket::SSL

See README.SSL file in libwww distro for details.

If you want to run test suite ('make test') you need also

 view all matches for this distribution


Haineko

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

            "Class::Accessor::Lite" : "0.05",
            "Crypt::SaltedHash" : "0.05",
            "Digest::SHA" : "5.61",
            "Email::MIME" : "1.910",
            "Furl" : "2.17",
            "IO::Socket::SSL" : "1.94",
            "JSON::Syck" : "1.18",
            "Net::CIDR::Lite" : "0.21",
            "Net::DNS" : "0.68",
            "Net::SMTPS" : "0.03",
            "Parallel::Prefork" : "0.14",

 view all matches for this distribution


IMAP-Admin

 view release on metacpan or  search on metacpan

Admin.pm  view on Meta::CPAN

    foreach $ssl_key (keys(%{$self})) {
	    if ($ssl_key =~ /^SSL_/) {
        push @ssl_options, $ssl_key, $self->{$ssl_key};
	    }
    }
    my $SSL_try = "use IO::Socket::SSL";

    eval $SSL_try;
#	$IO::Socket::SSL::DEBUG = 1;
    if (!eval {
	    $self->{'Socket'} =
      IO::Socket::SSL->new(PeerAddr => $self->{'Server'},
                           PeerPort => $self->{'Port'},
                           Proto => 'tcp',
                           Reuse => 1,
                           Timeout => 5,
                           @ssl_options); }) {

Admin.pm  view on Meta::CPAN

                           'Password' => 'password_of_imap_adminstrator',
                           'Port' => port# (143 is default),
                           'Separator' => ".", # default is a period
                           'CRAM' => 1, # off by default, can be 0,1,2
                           'SSL' => 1, # off by default
                           # and any of the SSL_ options from IO::Socket::SSL
                           );

  $err = $imap->create("user.bob");
  if ($err != 0) {
    print "$imap->{'Error'}\n";

Admin.pm  view on Meta::CPAN


Separator on the new call is the hiearchical separator used by the imap server.  It is defaulted to a period ("/" might be another popular one).

CRAM on the new call will attempt to use CRAM-MD5 as the login type of choice.  A value of 0 means off, 1 means on, 2 means on with fallback to login.  *Note* this options requires these perl modules: Digest::MD5, Digest::HMAC, MIME::Base64

SSL on the new call will attempt to make an SSL connection to the imap server.  It does not fallback to a regular connection if it fails.  It is off by default.  IO::Socket::SSL requires a ca certificate, a client certificate, and a client private ke...

If you start the name of the server with a / instead of using tcp/ip it'll attempt to use a unix socket.

I generated my ca cert and ca key with openssl:
 openssl req -x509 -newkey rsa:1024 -keyout ca-key.pem -out ca-cert.pem

 view all matches for this distribution


IMAP-Client

 view release on metacpan or  search on metacpan

lib/IMAP/Client.pm  view on Meta::CPAN



package IMAP::Client;

use IO::Socket::INET;
use IO::Socket::SSL;
use MIME::Base64;
use URI::imap;
use URI::Escape;

use Exporter;

lib/IMAP/Client.pm  view on Meta::CPAN

##### connect
=pod

=item B<connect(%args)>

Connect to the supplied IMAP server.  Inerits all the options of IO::Socket::SSL (and thusly, IO::Socket::INET), and adds the following custom options:

=over 4

=item ConnectMethod

lib/IMAP/Client.pm  view on Meta::CPAN

    my $server;
    foreach my $method (@methods) {
		my @resp;
		if ($method eq "SSL") {
		    $args{PeerPort} = $args{IMAPSPort} || 993;
		    unless ($server = new IO::Socket::SSL(%args)) {
				$errorstr .= "SSL Attempt: ". IO::Socket::SSL::errstr() ."\n";
				next;
		    }
		} elsif ($method eq 'STARTTLS') {
		    $args{PeerPort} = $args{IMAPPort} || 143;
		    unless ($server = new IO::Socket::INET(%args)) {

lib/IMAP/Client.pm  view on Meta::CPAN


Issue a STARTTLS negotiation to secure the data connection.  This function will call capability() twice - once before issuing the starttls() command to verify that the atom STARTTLS is listed as a capability(), and once after the sucessful negotiatio...

STARTTLS is checked in capability() regardless of the value of capability_checking().

Any call arguments in %args are passed onto the underlying IO::Socket::SSL->start_SSL() function.

This function returns 1 on success, since there is no output to return on success.  Failures are treated normally.

=cut

lib/IMAP/Client.pm  view on Meta::CPAN

		return($self->throw_error("STARTTLS not found in CAPABILITY"));
    }
    my @recv = $self->_imap_command("STARTTLS",undef);
    $self->dprint(0x01, "<TLS negotiations>\n"); # compensation for lack of tapping into dump
    $args{SSL_version} ||= 'TLSv1';
    if (IO::Socket::SSL->start_SSL($self->{'server'}, %args)) {
		# per RFC 3501 - 6.2.1, we must re-establish the CAPABILITY of the server after STARTTLS
		$self->{capability} = '';
		@recv = $self->capability();
    } else {
		return($self->throw_error("STARTTLS Attempt: ".IO::Socket::SSL::errstr()))
    }
    return(@recv);
}

=pod

lib/IMAP/Client.pm  view on Meta::CPAN


    This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

=head1 SEE ALSO

perl, IO::Socket, IO::Socket::SSL, MIME::Base64, URI, URI::imap, URI::Escape

=cut


1;

 view all matches for this distribution


IMDB-JSON

 view release on metacpan or  search on metacpan

lib/IMDB/JSON.pm  view on Meta::CPAN

$IMDB::JSON::VERSION = "0.05";

use strict;
use HTML::TokeParser;
use LWP::Simple qw($ua get);
use IO::Socket::SSL;
use JSON::XS;

=head1 SYNOPSIS

 use IMDB::JSON;

lib/IMDB/JSON.pm  view on Meta::CPAN

 
	$ENV{'PERL_LWP_SSL_VERIFY_HOSTNAME'} = 0;  
	my $ua = LWP::UserAgent->new(
		ssl_opts => {
			verify_hostname => 0, 
			SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE, 
		}
	); 
 
	# Set the user agent to something
	$ua->agent($self->{user_agent}) if $self->{user_agent};

 view all matches for this distribution


IO-Async-SSL

 view release on metacpan or  search on metacpan

lib/IO/Async/SSL.pm  view on Meta::CPAN


use Carp;

use POSIX qw( EAGAIN EWOULDBLOCK );

use IO::Socket::SSL 2.003 qw( $SSL_ERROR SSL_WANT_READ SSL_WANT_WRITE ); # default_ca
   # require >= 2.003 for bugfixes - see RT#125220

use Future 0.33; # ->catch_with_f
use IO::Async::Handle 0.29;
use IO::Async::Loop 0.61; # new Listen API

lib/IO/Async/SSL.pm  view on Meta::CPAN

 );

=head1 DESCRIPTION

This module extends existing L<IO::Async> classes with extra methods to allow
the use of SSL or TLS-based connections using L<IO::Socket::SSL>. It does not
directly provide any methods or functions of its own.

Primarily, it provides C<SSL_connect> and C<SSL_listen>, which yield
C<IO::Socket::SSL>-upgraded socket handles or L<IO::Async::Stream>
instances, and two forms of C<SSL_upgrade> to upgrade an existing TCP
connection to use SSL.

As an additional convenience, if the C<SSL_verify_mode> and C<SSL_ca_*>
options are omitted, the module will attempt to provide them by querying the
result of L<IO::Socket::SSL>'s C<default_ca> function. Otherwise, the module
will print a warning and set C<SSL_VERIFY_NONE> instead.

=cut

my %SSL_ca_args = IO::Socket::SSL::default_ca();

sub _SSL_args
{
   my %args = @_;

   # SSL clients (i.e. non-server) require a verify mode
   if( !$args{SSL_server} and !defined $args{SSL_verify_mode} and
       !defined $args{SSL_ca_file} and !defined $args{SSL_ca_path} ) {
      unless( %SSL_ca_args ) {
         carp "Unable to set SSL_VERIFY_PEER because IO::Socket::SSL::default_ca() gives nothing";
         $SSL_ca_args{SSL_verify_mode} = IO::Socket::SSL::SSL_VERIFY_NONE();
      }

      %args = ( %SSL_ca_args, %args );
   }

lib/IO/Async/SSL.pm  view on Meta::CPAN

If true, indicates this is the server side of the connection.

=back

In addition, any parameter whose name starts C<SSL_> will be passed to the
C<IO::Socket::SSL> constructor.

The following legacy callback arguments are also supported, in case the
returned future is not used:

=over 8

=item on_upgraded => CODE

A continuation that is invoked when the socket has been successfully upgraded
to SSL. It will be passed an instance of an C<IO::Socket::SSL>, which will
have appropriate SSL-compatible reader/writer functions attached.

 $on_upgraded->( $sslsocket )

=item on_error => CODE

A continuation that is invoked if C<IO::Socket::SSL> detects an error while
negotiating the upgrade.

 $on_error->( $! )

=back

lib/IO/Async/SSL.pm  view on Meta::CPAN

   }

   my %ssl_params = map { $_ => delete $params{$_} } grep m/^SSL_/, keys %params;

   eval {
      $socket = IO::Socket::SSL->start_SSL( $socket, _SSL_args
         SSL_startHandshake => 0,

         # Required to make IO::Socket::SSL not ->close before we have a chance to remove it from the loop
         SSL_error_trap => sub { },

         %ssl_params,
      ) or die IO::Socket::SSL->errstr;
   } or do {
      chomp( my $e = $@ );
      return $f->fail( $e, "ssl" );
   };

lib/IO/Async/SSL.pm  view on Meta::CPAN

         $f->done( $stream || $socket );
         return;
      }

      if( $! != EAGAIN and $! != EWOULDBLOCK ) {
         my $errstr = IO::Socket::SSL::errstr();
         $loop->remove( $self );
         $f->fail( $errstr, "ssl" );
         return;
      }

lib/IO/Async/SSL.pm  view on Meta::CPAN

This method performs a non-blocking connection to a given address or set of
addresses, upgrades the socket to SSL, then yields a C<IO::Async::Stream>
object when the SSL handshake is complete.

It takes all the same arguments as C<IO::Async::Loop::connect()>. Any argument
whose name starts C<SSL_> will be passed on to the L<IO::Socket::SSL>
constructor rather than the Loop's C<connect> method. It is not required to
pass the C<socktype> option, as SSL implies this will be C<stream>.

This method can also upgrade an existing C<IO::Async::Stream> or subclass
instance given as the C<handle> argument, by setting the C<reader> and

lib/IO/Async/SSL.pm  view on Meta::CPAN


=over 8

=item on_ssl_error => CODE

A continuation that is invoked if C<IO::Socket::SSL> detects an SSL-based
error once the actual stream socket is connected.

=back

If the C<on_connected> continuation is used, the socket handle it yields will
be a C<IO::Socket::SSL>, which must be wrapped in C<IO::Async::SSLStream> to
be used by C<IO::Async>. The C<on_stream> continuation will already yield such
an instance.

=cut

lib/IO/Async/SSL.pm  view on Meta::CPAN

invoke the callback each time a new connection is accepted on the socket and
the SSL handshake has been completed. This can be either the C<on_accept> or
C<on_stream> continuation; C<on_socket> is not supported.

It takes all the same arguments as C<IO::Async::Loop::listen()>. Any argument
whose name starts C<SSL_> will be passed on to the L<IO::Socket::SSL>
constructor rather than the Loop's C<listen> method. It is not required to
pass the C<socktype> option, as SSL implies this will be C<stream>.

In addition, the following arguments are rquired:

=over 8

=item on_ssl_error => CODE

A continuation that is invoked if C<IO::Socket::SSL> detects an SSL-based
error once the actual stream socket is connected.

=back

The underlying L<IO::Socket::SSL> socket will also require the server key and
certificate for a server-mode socket. See its documentation for more details.

If the C<on_accept> continuation is used, the socket handle it yields will be
a C<IO::Socket::SSL>, which must be wrapped in C<IO::Async::SSLStream> to be
used by C<IO::Async>. The C<on_stream> continuation will already yield such an
instance.

=cut

 view all matches for this distribution


IO-EPP

 view release on metacpan or  search on metacpan

lib/IO/EPP.pm  view on Meta::CPAN

=head1 DESCRIPTION

IO::EPP is a very light and fast interface of the access to EPP API from the client's side with minimum dependences.
It is independent of libxml and other heavy libraries.

It works over L<IO::Socket::SSL> without additional modules and demands only L<Digest::MD5> for generation of unique ID and L<Time::HiRes> for the purpose of logging.
L<LWP> is necessary for two registries and one reseller (TCI/RIPN, Taeping и HosterKZ), because EPP of these providers works over HTTPS.

In test mode IO::EPP can emulate the job of some registries.
Now the emulation of Verisign Core and CentralNic servers is supported at the level of 99% of answers.
The test environment for L<IO::EPP::Base> uses the emulation of CentralNic without extensions.

lib/IO/EPP.pm  view on Meta::CPAN

An example of registration of a new nameserver

    use IO::EPP::CNic;
    use Data::Dumper;

    # Parameters for IO::Socket::SSL
    my %sock_params = (
        PeerHost        => 'epp.centralnic.com',
        PeerPort        => 700,
        SSL_key_file    => 'ssl_key_file.pem',
        SSL_cert_file   => 'ssl_cert_file.pem',

lib/IO/EPP.pm  view on Meta::CPAN


        unless ( $params->{conn} ) {
            # need create new connection
            state $config = Config::get('Providers.Verisign');

            # Parameters for IO::Socket::SSL
            my %sock_params = (
                PeerPort         => $config->{port},
                Proto            => 'tcp',
                SSL_key_file     => $config->{ssl_key_file},
                SSL_cert_file    => $config->{ssl_cert_file},
                # SSL_verify_mode => SSL_VERIFY_NONE, -- for this parameter need use IO::Socket::SSL
                Timeout          => 30,
                debug            => 1,
            );

            if ( $params->{tld} =~ /^(com|net|edu)$/ ) {

 view all matches for this distribution


IO-Lambda

 view release on metacpan or  search on metacpan

lib/IO/Lambda.pm  view on Meta::CPAN

L<IO::Lambda::Socket> - lambda versions of C<connect>, C<accept> etc.

=item *

L<IO::Lambda::HTTP> - implementation of HTTP and HTTPS protocols.  HTTPS
requires L<IO::Socket::SSL>, NTLM/Negotiate authentication requires
L<Authen::NTLM> modules (not marked as dependencies).

=item *

L<IO::Lambda::DNS> - asynchronous domain name resolver.

 view all matches for this distribution


IO-Multiplex

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

1.10  Mon Sep 15 2008
	- Update Copyright and License.
	- Buttwag around minor Windows deficiencies.

1.09  Sat Mar 03 2007
	- Detect readability for special IO::Socket::SSL
	  handles more accurately.
	- Avoid "freed value in iteration" crashing.

1.08  Fri Nov 11 2003
	- Solaris/FreeBSD compatibility fixes.

 view all matches for this distribution


IO-Select-SSL

 view release on metacpan or  search on metacpan

lib/IO/Select/SSL.pm  view on Meta::CPAN

1;
__END__

=head1 NAME

IO::Select::SSL - IO::Socket::SSL compatible IO::Select

=head1 SYNOPSIS

  use IO::Select::SSL;
  my $sel = new IO::Select::SSL;


=head1 DESCRIPTION

This module is intended to be a drop-in replacement for IO::Select.
However, the can_read method actually handles the very special IO::Socket::SSL
handles correctly by returning those handles that still have at least some
decrypted characters in the buffer.
Without this module, can_read will choke forever (or until timeout)
waiting for the socket to be ready to read even when there is still
something just sitting in the buffer ready to be immediately read.

lib/IO/Select/SSL.pm  view on Meta::CPAN

Rob Brown E<lt>bbb@cpan.orgE<gt>

=head1 SEE ALSO

L<IO::Select>.
L<IO::Socket::SSL>.

=head1 COPYRIGHT AND LICENSE

Copyright (C) 2006-2025 by Rob Brown <bbb@cpan.org>

 view all matches for this distribution


IO-Socket-CLI

 view release on metacpan or  search on metacpan

lib/IO/Socket/CLI.pm  view on Meta::CPAN

package IO::Socket::CLI;
$IO::Socket::CLI::VERSION = '0.041';
use 5.006;
use strict;
use warnings;
use IO::Socket::SSL;
use IO::Socket::INET6;
use Carp;

# defaults
my $DEBUG = 0;			# boolean?

lib/IO/Socket/CLI.pm  view on Meta::CPAN

    $self->{_SOCKET} = IO::Socket::INET6->new(PeerAddr => $self->{_HOST},
                                              PeerPort => $self->{_PORT},
                                              Blocking => 0) ||
            die "Can't bind : $@\n";

    ($self->{_SSL}) and IO::Socket::SSL->start_SSL($self->{_SOCKET});
    $self->{_OPEN} = ($self->{_SOCKET}->connected()) ? 1 : 0;
    $self->{_COMMAND} = '';
    $self->{_SERVER_RESPONSE} = [];

    bless ($self, $class);

lib/IO/Socket/CLI.pm  view on Meta::CPAN


__END__

=head1 NAME

IO::Socket::CLI - CLI for IO::Socket::INET6 and IO::Socket::SSL

=head1 VERSION

version 0.041

lib/IO/Socket/CLI.pm  view on Meta::CPAN

  our @ISA = ("IO::Socket::CLI");

=head1 DESCRIPTION

C<IO::Socket::CLI> provides a command-line interface to L<IO::Socket::INET6> and
L<IO::Socket::SSL>.

=for comment
=head1 EXPORT
None by default.

lib/IO/Socket/CLI.pm  view on Meta::CPAN


L<IO::Socket::INET6>

L<IO::Socket::INET>

L<IO::Socket::SSL>

L<IO::Socket>

 view all matches for this distribution


IO-Socket-Forwarder

 view release on metacpan or  search on metacpan

lib/IO/Socket/Forwarder.pm  view on Meta::CPAN

    $out =~ s/([^ -~])/sprintf("\\x%02x", ord $1)/ge;
    warn sprintf("%02d:%02d:%02d.%03d: %s\n",
		 @date[2, 1, 0], 1000 * ($time - int $time), $out);
}

# lazy accessors to IO::Socket::SSL
# we use it but don't depend on it!
sub _ssl_error { $IO::Socket::SSL::SSL_ERROR }
sub _ssl_want_read { IO::Socket::SSL::SSL_WANT_READ() }
sub _ssl_want_write { IO::Socket::SSL::SSL_WANT_WRITE() }

sub _min { $_[0] < $_[1] ? $_[0] : $_[1] }

sub forward_sockets {
    my ($s1, $s2, %opts) = @_;

lib/IO/Socket/Forwarder.pm  view on Meta::CPAN

    my $fn1 = fileno $s1;
    defined $fn1 or croak "socket 1 is not a valid file handle";
    my $fn2 = fileno $s2;
    defined $fn1 or croak "socket 2 is not a valid file handle";

    my $ssl1 = $s1->isa('IO::Socket::SSL');
    my $ssl2 = $s2->isa('IO::Socket::SSL');

    $debug and _debug "s1 fn=$fn1, ssl=$ssl1";
    $debug and _debug "s2 fn=$fn2, ssl=$ssl2";

    my $b1to2 = delete $opts{buffer_1to2} // '';

lib/IO/Socket/Forwarder.pm  view on Meta::CPAN


=head1 DESCRIPTION

This module allows to forward data between two sockets bidirectionally.

IO::Socket::SSL sockets are also supported.

=head2 FUNCTIONS

=over 4

lib/IO/Socket/Forwarder.pm  view on Meta::CPAN

Reads and writes data from both sockets simultaneously forwarding it.

On return both sockets will be closed.

This function automatically detects if any of the sockets is of type
L<IO::Socket::SSL> and doesn't require any extra configuration to
handle them.

The following options are accepted:

=over 4

lib/IO/Socket/Forwarder.pm  view on Meta::CPAN


=back

=head1 SEE ALSO

L<IO::Socket>, L<IO::Socket::SSL>.

The samples directory contains a couple of scripts showing how to use
this module.

=head1 BUGS AND SUPPORT

 view all matches for this distribution


IO-Socket-IP

 view release on metacpan or  search on metacpan

lib/IO/Socket/IP.pm  view on Meta::CPAN

            return 0;
         }

         # If connect failed but we have no system error there must be an error
         # at the application layer, like a bad certificate with
         # IO::Socket::SSL.
         # In this case don't continue IP based multi-homing because the problem
         # cannot be solved at the IP layer.
         return 0 if ! $!;

         ${*$self}{io_socket_ip_errors}[0] = $!;

 view all matches for this distribution


IO-Socket-SSL

 view release on metacpan or  search on metacpan

example/async_https_server.pl  view on Meta::CPAN

# request, send back as text/plain
##########################################################

use strict;
use IO::Socket;
use IO::Socket::SSL;
use Event::Lib;
use Errno ':POSIX';

#$Net::SSLeay::trace=3;

example/async_https_server.pl  view on Meta::CPAN

sub _s_accept {
    my $fds = shift->fh;
    my $fdc = $fds->accept || return;
    DEBUG( "new client" );

    $fdc = IO::Socket::SSL->start_SSL( $fdc,
	SSL_startHandshake => 0,
	SSL_server => 1,
    ) || die $!;

    $fdc->blocking(0);

 view all matches for this distribution


IO-Socket-SecureSocks

 view release on metacpan or  search on metacpan

lib/IO/Socket/SecureSocks.pm  view on Meta::CPAN


use vars qw(@ISA $VERSION);

require Exporter;
require IO::Socket::Socks;
require IO::Socket::SSL;

@IO::Socket::Socks::ISA = qw(Exporter IO::Socket::SSL);
@ISA = qw(Exporter IO::Socket::Socks);
$VERSION = '0.2';

1;

lib/IO/Socket/SecureSocks.pm  view on Meta::CPAN

IO::Socket::SecureSocks connects to a SOCKS v5 proxy over a secure line (SSL), tells it to open a connection to a remote host/port
when the object is created. The object you receive can be used directly as a socket for sending and receiving data from the remote host.

=head1 SEE ALSO

L<IO::Socket::Socks|IO::Socket::Socks>, L<IO::Socket::SSL|IO::Socket::SSL>

=head1 AUTHOR

Sascha Kiefer, C<esskar@cpan.org>

 view all matches for this distribution


IO-Socket-Socks-Wrapper

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

      - alot of tests added
      - suppress warnings about prototype mismatch
      - override IO::Socket::connect instead of IO::Socket::INET::connect if package inherits from IO::Socket,
        makes available to wrap IO::Socket::INET package
      - call package version of the connect if it has own, makes available to wrap packages like
        IO::Socket::SSL

0.03  Mon Apr 18 23:32:42 2011
      - added support for packages (even if package name != module name)

0.02  Mon Feb 15 18:22:17 2011

 view all matches for this distribution


IOMux-HTTP

 view release on metacpan or  search on metacpan

lib/IOMux/HTTP/Client.pod  view on Meta::CPAN

   is a IOMux::Handler

=head1 SYNOPSIS

  my $socket = IO::Socket::INET->new(@sock_params);
  my $socket = IO::Socket::SSL->new(@sock_params);
  my $client = IOMux::HTTP::Client->new(socket => $socket);
  $mux->add($client);

  # or in one go:
  my $client = $mux->add(IOMux::HTTP::Client->new(@sock_params));

 view all matches for this distribution


IOMux

 view release on metacpan or  search on metacpan

examples/echo-daemon.pl  view on Meta::CPAN

use IOMux::Service::TCP;

use Getopt::Long   qw/GetOptions :config no_ignore_case bundling/;
use File::Basename qw/basename/;

#use IO::Socket::SSL; # when SSL is used anywhere

#
## get command-line options
#

 view all matches for this distribution


IPCamera-Reolink

 view release on metacpan or  search on metacpan

lib/IPCamera/Reolink.pm  view on Meta::CPAN

use 5.006;
use strict;
use warnings;

use REST::Client;
use IO::Socket::SSL;
use JSON;
use Data::Dumper;
use Time::HiRes;
use String::Random;

 view all matches for this distribution


IPDR

 view release on metacpan or  search on metacpan

lib/IPDR/Collection/Cisco.pm  view on Meta::CPAN


use warnings;
use strict;
use IO::Select;
use IO::Socket;
use IO::Socket::SSL;
use POSIX;
use Time::HiRes qw( usleep ualarm gettimeofday tv_interval clock_gettime clock_getres );

$SIG{CHLD}="IGNORE";

lib/IPDR/Collection/Cisco.pm  view on Meta::CPAN

                                if ( !$remotespeed )
                                        { $remotespeed=10; }
                                my $lsr;
                                if ( $self->{_GLOBAL}{'RemoteSecure'} )
                                        {
                                        $lsr = IO::Socket::SSL->new
                                                (
                                                PeerAddr => $remoteip,
                                                PeerPort => $remoteport,
                                                SSL_key_file => $self->{_GLOBAL}{'SSLKeyFile'},
                                                ReuseAddr => 1,

lib/IPDR/Collection/Cisco.pm  view on Meta::CPAN

        else
        {
        my $lsr;
        if ( $self->{_GLOBAL}{'RemoteSecure'} )
                {
                $lsr = IO::Socket::SSL->new
                        (
                        PeerAddr => $self->{_GLOBAL}{'RemoteIP'},
                        PeerPort => $self->{_GLOBAL}{'RemotePort'},
                        SSL_key_file => $self->{_GLOBAL}{'SSLKeyFile'},
                        ReuseAddr => 1,

 view all matches for this distribution


Installer

 view release on metacpan or  search on metacpan

lib/Installer/cpanm.pm  view on Meta::CPAN

$fatpacked{"File/pushd.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'FILE_PUSHD';
  use strict;use warnings;package File::pushd;our$VERSION='1.009';our@EXPORT=qw(pushd tempd);our@ISA=qw(Exporter);use Exporter;use Carp;use Cwd qw(getcwd abs_path);use File::Path qw(rmtree);use File::Temp qw();use File::Spec;use overload q{""}=>sub {...
FILE_PUSHD

$fatpacked{"HTTP/Tiny.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'HTTP_TINY';
  package HTTP::Tiny;use strict;use warnings;our$VERSION='0.056';use Carp ();my@attributes;BEGIN {@attributes=qw(cookie_jar default_headers http_proxy https_proxy keep_alive local_address max_redirect max_size proxy no_proxy timeout SSL_options verif...
      sub $sub_name {
          my (\$self, \$url, \$args) = \@_;
          \@_ == 2 || (\@_ == 3 && ref \$args eq 'HASH')
          or Carp::croak(q/Usage: \$http->$sub_name(URL, [HASHREF])/ . "\n");
          return \$self->request('$req_method', \$url, \$args || {});

 view all matches for this distribution


( run in 2.451 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )