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?
my $sock = IO::Socket::INET->new(PeerAddr=>'server_address:443') or d
my $ctx = Net::SSLeay::CTX_new() or die;
my $ssl = Net::SSLeay::new($ctx) or die;
Net::SSLeay::set_fd($ssl, fileno($sock)) or die;
# 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?