fwingx has asked for the wisdom of the Perl Monks concerning the following question:
I try to use Net::SSLeay to make one SSL client. After the ssl connection was done successfully, if the server want to shutdown the ssl connection, it would send one encrypted ssl alert--close nodify.
My question is how to read this alert record in perl code?
use Net::SSLeay; use IO::Socket::INET; Net::SSLeay::initialize(); my $sock = IO::Socket::INET->new(PeerAddr=>'server_address:443') or d +ie; my $ctx = Net::SSLeay::CTX_new() or die; Net::SSLeay::CTX_set_options($ctx, &Net::SSLeay::OP_ALL); my $ssl = Net::SSLeay::new($ctx) or die; Net::SSLeay::set_fd($ssl, fileno($sock)) or die; Net::SSLeay::connect($ssl); # The SSL connection is setup. # Here, after some times, the server sent one close nodify # alert record to shutdown its direction of ssl connection. # How to check or read the alert record from the server?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Use Net::SSLeay, how to read the encrypted ssl alert record.
by vsespb (Chaplain) on Aug 14, 2013 at 17:55 UTC | |
by locked_user sundialsvc4 (Abbot) on Aug 14, 2013 at 19:18 UTC | |
by vsespb (Chaplain) on Aug 14, 2013 at 19:29 UTC | |
by fwingx (Novice) on Aug 15, 2013 at 01:49 UTC |