Method: OpenSSL::SSL::SSLServer#initialize
- Defined in:
- lib/openssl/ssl.rb
#initialize(svr, ctx) ⇒ SSLServer
Creates a new instance of SSLServer.
-
srvis an instance of TCPServer. -
ctxis an instance of OpenSSL::SSL::SSLContext.
365 366 367 368 369 370 371 372 373 374 375 |
# File 'lib/openssl/ssl.rb', line 365 def initialize(svr, ctx) @svr = svr @ctx = ctx unless ctx.session_id_context # see #6137 - session id may not exceed 32 bytes prng = ::Random.new($0.hash) session_id = prng.bytes(16).unpack('H*')[0] @ctx.session_id_context = session_id end @start_immediately = true end |