Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
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.
See also
#hostname=
#peer_cert
#finished_message
#peer_cert_chain
also in
4.1 · 4.0 · 3.3 · 3.2 · 3.1 · 3.0