Method: OpenSSL::SSL::SSLContext#options=
- Defined in:
- ossl_ssl.c
#options=(integer) ⇒ Object
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).
779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 |
# File 'ossl_ssl.c', line 779
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;
}
|