Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

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

by vsespb (Chaplain)
on Aug 14, 2013 at 17:55 UTC ( #1049452=note: print w/replies, xml ) Need Help??

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

Have you tried
Low level API: ERR_* and SSL_alert_* related functions
(found in the documentation)

Replies are listed 'Best First'.
Re^2: Use Net::SSLeay, how to read the encrypted ssl alert record.
by sundialsvc4 (Abbot) on Aug 14, 2013 at 19:18 UTC

    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, 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.

      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.

      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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1049452]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2018-05-27 18:43 GMT
Find Nodes?
    Voting Booth?