Method: OpenSSL::SSL::SSLServer#initialize
- Defined in:
- lib/openssl/ssl.rb
#initialize(svr, ctx) ⇒ SSLServer
Creates a new instance of SSLServer.
-
srv is an instance of TCPServer.
-
ctx is an instance of OpenSSL::SSL::SSLContext.
450 451 452 453 454 455 456 457 458 459 460 |
# File 'lib/openssl/ssl.rb', line 450 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 |