brunoos/luasec — pull request #8 by xnyhps (2013-09-08 13:05:52+00:00)
Title: Report the actual TLS version used, not the version the cipher belongs to.

`:info("protocol")` does not return the TLS version used for a connection, it returns the TLS version where the cipher was introduced in. This is because `:info()` parses the cipher info, which is a static string for every cipher (see the output of "openssl ciphers -V").

By using `SSL_get_version` it is possible to get the actual TLS version used for a connection. This pull request implements that, with a fallback to the cipher's protocol.