instance method
OpenSSL::SSL::SSLSocket#npn_protocol
() -> ::String?
ssl.npn_protocol => String | nil
ext/openssl/ossl_ssl.c
View on GitHub ↗
static VALUE
ossl_ssl_npn_protocol(VALUE self)
{
SSL *ssl;
const unsigned char *out;
unsigned int outlen;
GetSSL(self, ssl);
SSL_get0_next_proto_negotiated(ssl, &out, &outlen);
if (!outlen)
return Qnil;
else
return rb_str_new((const char *) out, outlen);
}
Returns the protocol string that was finally selected by the client during the handshake.