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


Google-Ads-GoogleAds-Client

 view release on metacpan or  search on metacpan

Build.PL  view on Meta::CPAN

    "File::Spec"                   => 0,
    "File::Temp"                   => 0,
    "FindBin"                      => 0,
    "Getopt::Long"                 => 0,
    "HTTP::Server::Simple::CGI"    => 0,
    "IO::Socket::SSL"              => 0,
    "JSON::Parse"                  => 0,
    "JSON::SL"                     => 0,
    "JSON::XS"                     => 0,
    "JSON::WebToken"               => 0,
    "List::Util"                   => 0,

 view all matches for this distribution


Google-ISBNNumbers

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

      },
      "runtime" : {
         "requires" : {
            "Cpanel::JSON::XS" : "4.08",
            "HTTP::Tiny" : "0.076",
            "IO::Socket::SSL" : "1.56",
            "Net::SSLeay" : "1.49",
            "perl" : "5.022001"
         }
      },
      "test" : {

 view all matches for this distribution


Google-Plus

 view release on metacpan or  search on metacpan

lib/Google/Plus.pm  view on Meta::CPAN

use Mojo::Base -base;
use v5.10.1;

use Mojo::URL;
use Mojo::UserAgent;
use IO::Socket::SSL 1.37;
use Carp;

has [qw/key ua/];

our $service = 'https://www.googleapis.com/plus/v1';

 view all matches for this distribution


Google-Voice

 view release on metacpan or  search on metacpan

lib/Google/Voice.pm  view on Meta::CPAN

use strict;
use warnings;

use Mojo::UserAgent;
use Mojo::JSON;
use IO::Socket::SSL 1.37;

use Google::Voice::Feed;
use Google::Voice::Call;

use Mojo::Base -base;

 view all matches for this distribution


Growl-Tiny

 view release on metacpan or  search on metacpan

cpanfile.snapshot  view on Meta::CPAN

      Exporter 5.57
      ExtUtils::MakeMaker 6.30
  IO-Socket-SSL-2.012
    pathname: S/SU/SULLR/IO-Socket-SSL-2.012.tar.gz
    provides:
      IO::Socket::SSL 2.012
      IO::Socket::SSL::Intercept 1.93
      IO::Socket::SSL::OCSP_Cache 2.012
      IO::Socket::SSL::OCSP_Resolver 2.012
      IO::Socket::SSL::PublicSuffix undef
      IO::Socket::SSL::SSL_Context 2.012
      IO::Socket::SSL::SSL_HANDLE 2.012
      IO::Socket::SSL::Session_Cache 2.012
      IO::Socket::SSL::Utils 0.031
    requirements:
      ExtUtils::MakeMaker 0
      Mozilla::CA 0
      Net::SSLeay 1.46
      Scalar::Util 0

cpanfile.snapshot  view on Meta::CPAN

    provides:
      LWP::Protocol::https 6.06
      LWP::Protocol::https::Socket 6.06
    requirements:
      ExtUtils::MakeMaker 0
      IO::Socket::SSL 1.54
      LWP::UserAgent 6.06
      Mozilla::CA 20110101
      Net::HTTPS 6
      perl 5.008001
  Lexical-SealRequireHints-0.007

 view all matches for this distribution


HTTP-DAV

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN


    *   XML::DOM (Have not tested lower than v1.26). Requires James Clark's
        expat library:

    *   To access SSL urls you will need Crypt::SSLeay and/or
        IO::Socket::SSL.

  Optional Prerequisites.
    *   Crypt::SSLeay if you'd like to use https. Crypt::SSLeay requires the
        openssl library as well. See Crypt::SSLeay's excellent install
        instructions for how to get https support into LWP (and hence

 view all matches for this distribution


HTTP-Daemon-SSL

 view release on metacpan or  search on metacpan

SSL.pm  view on Meta::CPAN

#
# This package derived almost entirely from HTTP::Daemon,
# owned by Gisle Aas.  Changes include minor alterations in
# the documentation to reflect the use of IO::Socket::SSL
# and modified new(),accept() functions that use IO::Socket::SSL

use strict;

package HTTP::Daemon::SSL;

SSL.pm  view on Meta::CPAN


=head1 DESCRIPTION

Instances of the I<HTTP::Daemon::SSL> class are HTTP/1.1 servers that
listen on a socket for incoming requests. The I<HTTP::Daemon::SSL> is a
sub-class of I<IO::Socket::SSL>, so you can perform socket operations
directly on it too.

The accept() method will return when a connection from a client is
available.  In a scalar context the returned value will be a reference
to a object of the I<HTTP::Daemon::ClientConn::SSL> class which is another
I<IO::Socket::SSL> subclass.  In a list context a two-element array
is returned containing the new I<HTTP::Daemon::ClientConn::SSL> reference
and the peer address; the list will be empty upon failure. (Note that version
 1.02 erroneously did not honour list context). Calling
the get_request() method on the I<HTTP::Daemon::ClientConn::SSL> object
will read data from the client and return an I<HTTP::Request> object

SSL.pm  view on Meta::CPAN

=cut


use vars qw($VERSION @ISA $PROTO $DEBUG);

use IO::Socket::SSL;
use HTTP::Daemon;

$VERSION = "1.04";
@ISA = qw(IO::Socket::SSL HTTP::Daemon);

=item $d = new HTTP::Daemon::SSL

The constructor takes the same parameters as the
I<IO::Socket::SSL> constructor.  It can also be called without specifying
any parameters, but you will have to make sure that you have an SSL certificate
and key for the server in F<certs/server-cert.pem> and F<certs/server-key.pem>.
See the IO::Socket::SSL documentation for how to change these default locations
and specify many other aspects of SSL behavior. The daemon will then set up a
listen queue of 5 connections and allocate some random port number.  A server
that wants to bind to some specific address on the standard HTTPS port will be
constructed like this:

SSL.pm  view on Meta::CPAN


sub accept
{
    my $self = shift;
    my $pkg = shift || "HTTP::Daemon::ClientConn::SSL";
	my ($sock, $peer) = IO::Socket::SSL::accept($self,$pkg);
    if ($sock) {
        ${*$sock}{'httpd_daemon'} = $self;
        return wantarray ? ($sock, $peer) : $sock;
    }
    else {

SSL.pm  view on Meta::CPAN

		      "HTTPS instead.\n");
    }
    $self->kill_socket;
}

# we're not overriding any methods here, but we are inserting IO::Socket::SSL
# into the message dispatch tree

package HTTP::Daemon::ClientConn::SSL;
use vars qw(@ISA $DEBUG);
@ISA = qw(IO::Socket::SSL HTTP::Daemon::ClientConn);
*DEBUG = \$HTTP::Daemon::DEBUG;


=head1 SEE ALSO

RFC 2068

L<IO::Socket::SSL>, L<HTTP::Daemon>, L<Apache>

=head1 COPYRIGHT

Code and documentation from HTTP::Daemon Copyright 1996-2001, Gisle Aas
Changes Copyright 2003-2004, Peter Behroozi

 view all matches for this distribution


HTTP-Daemon-Threaded

 view release on metacpan or  search on metacpan

TODO.txt  view on Meta::CPAN

HTTP::Daemon::Threaded TO DO:

- add a STDERR error log redirect

- SSL support via Crypt::SSLeay(or IO::Socket::SSL) + OpenSSL

- better optimization for CGIAdapter

- add user auth support

 view all matches for this distribution


HTTP-Promise

 view release on metacpan or  search on metacpan

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


If environment variable C<PERL_LWP_SSL_CA_PATH> or C<HTTPS_CA_DIR> is set, then the ssl option property C<SSL_ca_path> takes its value.

=back

Other options can be set and are processed directly by the SSL Socket implementation in use. See L<IO::Socket::SSL> or L<Net::SSL> for details.

=item * C<threshold>

Integer. Sets the content length threshold beyond which, the response content will be stored to a locale file. It can then be fetch with L</file>. Default to global variable C<$CONTENT_SIZE_THRESHOLD>, which is C<undef> by default.

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


If environment variable C<PERL_LWP_SSL_CA_PATH> or C<HTTPS_CA_DIR> is set, then the ssl option property C<SSL_ca_path> takes its value.

=back

Other options can be set and are processed directly by the SSL Socket implementation in use. See L<IO::Socket::SSL> or L<Net::SSL> for details.

=head2 stop_if

Sets or gets a callback code reference (reference to a perl subroutine or an anonymous subroutine) that will be used to determine if we  should keep trying upon reading data from the filehandle and an C<EINTR> error occurs.

 view all matches for this distribution


HTTP-Proxy-Selective

 view release on metacpan or  search on metacpan

META.yml  view on Meta::CPAN

  Config::Tiny: 0
  File::Slurp: 0
  File::Temp: 0
  HTTP::Headers: 1.64
  HTTP::Proxy: 0.22
  IO::Socket::SSL: 0
  Net::SSLeay: 0
  Path::Class: 0
resources:
  license: http://opensource.org/licenses/mit-license.php
version: 0.004

 view all matches for this distribution


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-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


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