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