Florian Ragwitz wrote:<br>&gt; On Thu, Sep 14, 2006 at 07:56:22PM +0000, <a href="mailto:sampo@symlabs.com">sampo@symlabs.com</a> wrote:<br>&gt; <br>&gt;&gt;MacGyveR writes:<br>&gt;&gt;<br>&gt;&gt;&gt;Sorry for troubling you, I have a question regarding Net::SSLeay: 
<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;with &quot;openssl s_client -connect 123.123.123.123.:443 &lt; /dev/null&quot; you <br>&gt;&gt;&gt;receive the following response: <br>&gt;&gt;&gt;<br>&gt;&gt;&gt;New, TLSv1/SSLv3, Cipher is DHE-RSA-AES256-SHA
<br>&gt;&gt;&gt;Server public key is 2048 bit<br>&gt;&gt;&gt;SSL-Session:<br>&gt;&gt;&gt;&nbsp;&nbsp; Protocol&nbsp; : TLSv1<br>&gt;&gt;&gt;&nbsp;&nbsp; Cipher&nbsp;&nbsp;&nbsp; : DHE-RSA-AES256-SHA<br>&gt;&gt;&gt;&nbsp;&nbsp; Session-ID: <br>&gt;&gt;&gt;B81B40B607A06B832BE2F0D3521C00DAD33B7DFAB9B3935C78A7E6EAEA6358F1
<br>&gt;&gt;&gt;&nbsp;&nbsp; Session-ID-ctx:<br>&gt;&gt;&gt;&nbsp;&nbsp; Master-Key: <br>&gt;&gt;&gt;8ABDCAC29FBCA7FD4270F44D4814DD4B2B9B977C0C492F454ECC21DC9D2F4F13104F414E1F <br>&gt;&gt;&gt;EDBED819B5B01EECB393A7<br>&gt;&gt;&gt;&nbsp;&nbsp; Key-Arg&nbsp;&nbsp; : None
<br>&gt;&gt;&gt;&nbsp;&nbsp; Start Time: 1158153666<br>&gt;&gt;&gt;&nbsp;&nbsp; Timeout&nbsp;&nbsp; : 300 (sec)<br>&gt;&gt;&gt;&nbsp;&nbsp; Verify return code: 19 (self signed certificate in certificate chain)<br>&gt;&gt;&gt;--- <br>&gt;&gt;&gt;<br>&gt;&gt;&gt;How do I go about getting the &quot;Protocol&nbsp; : TLSv1&quot; value with Net::SSLeay? 
<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;I was thinking that it would be the following openssl fucntion: <br>&gt;&gt;&gt;<br>&gt;&gt;&gt;&nbsp;&nbsp; &nbsp;char *SSL_CIPHER_get_version(SSL_CIPHER *cipher); <br>&gt;&gt;&gt;<br>&gt;&gt;&gt;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Returns a string like ``TLSv1/SSLv3'' or ``SSLv2'' which &nbsp;&nbsp; &nbsp; 
<br>&gt;&gt;&gt;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;indicates the SSL/TLS protocol version to which cipher belongs &nbsp;&nbsp; &nbsp; <br>&gt;&gt;&gt;(i.e. where it was defined in the specification the first time). <br>&gt; <br>&gt; <br>&gt; I think it's Net::SSLeay::get_cipher($ssl), which you're after.
<br>&gt; <br>&gt; <br>&gt; -Flo<br>&gt; <br><br>get_cipher() will return values such as &quot;DHE-RSA-AES256-SHA&quot;, i'm looking for a function that returns the ssl protocol version such as &quot;TLSv1/SSLv3'' or &quot;SSLv2''.
<br><br>MacGyveR<br><br>