instance method
OpenSSL::SSL::SSLContext#flush_sessions
(::Time time) -> self
ctx.flush_sessions(time) → self
ext/openssl/ossl_ssl.c
View on GitHub ↗
static VALUE
ossl_sslctx_flush_sessions(int argc, VALUE *argv, VALUE self)
{
VALUE arg1;
SSL_CTX *ctx;
time_t tm = 0;
rb_scan_args(argc, argv, "01", &arg1);
GetSSLCTX(self, ctx);
if (NIL_P(arg1)) {
tm = time(0);
} else if (rb_obj_is_instance_of(arg1, rb_cTime)) {
tm = NUM2LONG(rb_funcall(arg1, rb_intern("to_i"), 0));
} else {
ossl_raise(rb_eArgError, "arg must be Time or nil");
}
SSL_CTX_flush_sessions(ctx, (long)tm);
return self;
}
Removes sessions in the internal cache that have expired at time.
See also
#enable_fallback_scsv
#freeze
#ecdh_curves=
#groups=
also in
4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0