るりまサーチ

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

別のキーワード

  1. certificate new
  2. openssl certificate
  3. certificate to_der
  4. certificate serial
  5. certificate not_after

ライブラリ

検索結果

OpenSSL::SSL::SSLServer (18012.0)

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

...nssl'

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)

loop do
while soc = serv.accept
puts soc.read...