Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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

by vsespb (Hermit)
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)


Comment on Re: Use Net::SSLeay, how to read the encrypted ssl alert record.
Download Code
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 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.

      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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2014-12-29 03:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (184 votes), past polls