るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.113秒)

別のキーワード

  1. sslcontext new
  2. sslcontext key
  3. sslcontext cert
  4. sslcontext cert=

ライブラリ

検索結果

OpenSSL::SSL::SSLServer (13.0)

SSL サーバーのためのクラス。

...だけのサーバです。

require 'socket'
require 'openssl'

include OpenSSL

ctx = SSL::SSLContext.new()
ctx.cert = X509::Certificate.new(File.read('cert.pem'))
ctx.key = PKey::RSA.new(File.read('privkey.pem'))
svr = TCPServer.new(2007)
serv = SSL::SSLServer.new(svr, ctx)...