LWP-Protocol-https-SocksChain

 view release on metacpan or  search on metacpan

Changelog  view on Meta::CPAN

1.8
	cleanup LWP::Debug ( Bug fixed: 51786 )

1.7
	Cleanup for LWP::Debug::trace

1.6
	Added client certificate support ( thanks Andrew Deryabin )

1.5
	Support IO::Socket::SSL > 0.97

1.4
	Fix deprecursion bug

1.3
	Fix KeepAlive connection support

	Fix global redefinition $^W

1.2

META.yml  view on Meta::CPAN

--- #YAML:1.0
name:                LWP-Protocol-https-SocksChain
version:             1.8
abstract:            ~
license:             ~
author:              
    - Igor Okunev <igor@prv.mts-nn.ru>
generated_by:        ExtUtils::MakeMaker version 6.42
distribution_type:   module
requires:     
    IO::Socket::SSL:               
    LWP:                           
    Net::SC:                       1.11
meta-spec:
    url:     http://module-build.sourceforge.net/META-spec-v1.3.html
    version: 1.3

Makefile.PL  view on Meta::CPAN


use ExtUtils::MakeMaker;
WriteMakefile(
    NAME              => 'LWP::Protocol::https::SocksChain',
    VERSION_FROM      => 'SocksChain.pm',
    PREREQ_PM         => {	Net::SC => 1.11,
							IO::Socket::SSL => undef,
							LWP => undef
						},
	'AUTHOR'		=> 'Igor Okunev <igor@prv.mts-nn.ru>',
);

README  view on Meta::CPAN

       make install

DEPENDENCIES

    This module requires these other modules and libraries:

       LWP

       Net::SC

       IO::Socket::SSL

SocksChain.pm  view on Meta::CPAN

	$res->header("Client-SSL-Cert-Subject" => $cert->subject_name);
	$res->header("Client-SSL-Cert-Issuer" => $cert->issuer_name);
    }
    $res->header("Client-SSL-Warning" => "Peer certificate not verified");
}


#-----------------------------------------------------------
package LWP::Protocol::https::SocksChain::Socket;
use Net::SC;
use IO::Socket::SSL;
use Net::HTTPS;
use vars qw( @ISA );
@ISA = (
		'LWP::Protocol::http::SocketMethods',
		'Net::HTTPS'
	   );

sub IO::Socket::SSL::SSL_HANDLE::READ { ${shift()}->read     (@_) }

sub new {
	my ( $self, %cfg ) = @_;

	my $host = $cfg{ PeerHost };
	my $port = $cfg{ PeerPort };

	#
	# client certificate support
	#

SocksChain.pm  view on Meta::CPAN

	my $sc = Net::SC->new( %cfg ) || die $!;
	
	unless ( ( my $rc = $sc->connect( $host, $port ) ) == SOCKS_OKAY ) {
		die socks_error($rc) . "\n";
	}

	my $obj = bless $sc->sh, $self;
	
	$obj->http_configure(\%cfg);

	if ( $IO::Socket::SSL::VERSION > 0.97 ) {
		$obj->configure_SSL( \%cfg ) && $obj->connect_SSL();
	} else {
		$obj->configure_SSL( \%cfg ) && $obj->connect_SSL($sc->sh);
	}
}

sub http_connect {
	return shift;
}



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