instance method
OpenSSL::SSL::SSLContext#options=
(::Integer ssl_options) -> ::Integer
ctx.options = integer
ext/openssl/ossl_ssl.c
View on GitHub ↗
static VALUE
ossl_sslctx_set_options(VALUE self, VALUE options)
{
SSL_CTX *ctx;
rb_check_frozen(self);
GetSSLCTX(self, ctx);
SSL_CTX_clear_options(ctx, SSL_CTX_get_options(ctx));
if (NIL_P(options)) {
SSL_CTX_set_options(ctx, SSL_OP_ALL);
} else {
SSL_CTX_set_options(ctx, NUM2ULONG(options));
}
return self;
}
Sets various OpenSSL options. The options are a bit field and can be combined with the bitwise OR operator (|). Available options are defined as constants in OpenSSL::SSL that begin with OP_.
For backwards compatibility, passing nil has the same effect as passing OpenSSL::SSL::OP_ALL.
See also man page SSL_CTX_set_options(3).
See also
#options
#security_level
#min_version=
#security_level=
also in
4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0