Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
The stupid question is the question not asked
 
PerlMonks  

Re^2: Use Net::SSLeay, how to read the encrypted ssl alert record.

by sundialsvc4 (Monsignor)
on Aug 14, 2013 at 19:18 UTC ( #1049464=note: print w/ replies, xml ) Need Help??


in reply to Re: Use Net::SSLeay, how to read the encrypted ssl alert record.
in thread Use Net::SSLeay, how to read the encrypted ssl alert record.

Have you?   :-/   The documentation that you refer-to here is frankly almost nonexistent:   the SSL_alert_ functions listed here show you how to extract bits of information from the alert record, but give no clue as to how one goes about getting one.

It’s pretty obvious that this library is a “wrapper” for functionality described, more-or-just-barely, at http://www.openssl.org/, which also does not readily dish-up the answer.   So, if anyone here actually knows the answer, and can offer a snippet of working Perl code, I am sure that it would be well received in the spirit of what PerlMonks should be.


Comment on Re^2: Use Net::SSLeay, how to read the encrypted ssl alert record.
Re^3: Use Net::SSLeay, how to read the encrypted ssl alert record.
by vsespb (Hermit) on Aug 14, 2013 at 19:29 UTC
    The code
    print Net::SSLeay::alert_desc_string(0);
    simply returns 'CN' (close notify).
    Did OP tried that? Did he have some problem with this function? Did he mention it in original post? No.
Re^3: Use Net::SSLeay, how to read the encrypted ssl alert record.
by fwingx (Initiate) on Aug 15, 2013 at 01:49 UTC

    I have checked all the DESCRIPTION of Net::SSLeay, even check the code of the IO::Socket::SSL, that module used the Net::SSLeay to make ssl connection. But I can not find any help.

    The only clue is about set_info_callback function in Net::SSLeay. But the description is disillusionary:

    "Sets the callback function, that can be used to obtain state information for $ssl during connection setup and use. When callback is 0 (NULL), the callback setting currently valid for ctx is used. ??? (does this function really work?)"

    Net::SSLeay::set_info_callback($ssl, $cb); # $ssl - value corresponding to openssl's SSL structure # $cb - pointer to function ??? # # returns: no return value

    And I have a try, it seem that function can not work well in perl.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1049464]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2014-04-21 01:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (489 votes), past polls