Method: OpenSSL::SSL::SSLSocket#ssl_version

Defined in:
ossl_ssl.c

#ssl_versionString

Returns a String representing the SSL/TLS version that was negotiated for the connection, for example “TLSv1.2”.

Returns:

  • (String)


2246
2247
2248
2249
2250
2251
2252
2253
2254
# File 'ossl_ssl.c', line 2246

static VALUE
ossl_ssl_get_version(VALUE self)
{
    SSL *ssl;

    GetSSL(self, ssl);

    return rb_str_new2(SSL_get_version(ssl));
}