in reply to Re: Net::SSLeay and secure renegotiation
in thread Net::SSLeay and secure renegotiation
#!/usr/bin/perl -w use Socket; use strict; use Net::SSLeay qw(die_now die_if_ssl_error copy_session_id); Net::SSLeay::load_error_strings(); Net::SSLeay::SSLeay_add_ssl_algorithms(); Net::SSLeay::randomize(); my ($res,$got); my $msg = "GET / HTTP/1.0"; my $dest_ip = 1.1.1.115; my $dest_serv_params = sockaddr_in( 443, $dest_ip ); socket( S, &AF_INET, &SOCK_STREAM, 0 ) or die "socket: $!"; connect( S, $dest_serv_params ) or die "connect: $!"; my $ctx = Net::SSLeay::CTX_new() or die_now("Cannot create SSL_CTX $!" +); Net::SSLeay::CTX_set_options($ctx,$Net::SSLeay::ssl_version = 2) and d +ie_if_ssl_error("ssl ctx set options"); Net::SSLeay::CTX_set_cipher_list($ctx,'ALL'); my $ssl1 = Net::SSLeay::new($ctx) or die_now("Cannot create SSL #1 $!" +); Net::SSLeay::set_fd( $ssl1, fileno(S) ); Net::SSLeay::renegotiate($ssl1); $res = Net::SSLeay::connect($ssl1) and die_if_ssl_error("ssl connect") +; $res = Net::SSLeay::write( $ssl1, $msg . "\n\n" ); die_if_ssl_error("ssl write"); $got = Net::SSLeay::read($ssl1); die_if_ssl_error("ssl read"); print $got; close S;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Net::SSLeay and secure renegotiation
by noxxi (Pilgrim) on Dec 11, 2016 at 20:48 UTC | |
by iThunder (Beadle) on Dec 11, 2016 at 23:45 UTC | |
by noxxi (Pilgrim) on Dec 12, 2016 at 07:29 UTC | |
by iThunder (Beadle) on Dec 13, 2016 at 04:49 UTC | |
by noxxi (Pilgrim) on Dec 13, 2016 at 06:32 UTC | |
| |
by afoken (Chancellor) on Dec 16, 2016 at 20:37 UTC |