本文簡要介紹ruby語言中 OpenSSL::SSL::SSLContext.tmp_dh =
的用法。
用法
tmp_dh = pkey
設置用於臨時 DH key 交換的 DH 參數。這僅與服務器相關。
pkey
是 OpenSSL::PKey::DH
的一個實例。請注意,包含在關鍵對象中的關鍵組件(如果有)將被忽略。服務器將始終為每次握手生成一個新的 key 對。
在 3.0 版中添加。另請參見手冊頁 SSL_set0_tmp_dh_pkey(3)。
例子:
ctx = OpenSSL::SSL::SSLContext.new
ctx.tmp_dh = OpenSSL::DH.generate(2048)
svr = OpenSSL::SSL::SSLServer.new(tcp_svr, ctx)
Thread.new { svr.accept }
相關用法
- Ruby SSLContext.add_certificate用法及代碼示例
- Ruby SSLContext.renegotiation_cb用法及代碼示例
- Ruby SSLContext.alpn_select_cb用法及代碼示例
- Ruby SSLContext.min_version =用法及代碼示例
- Ruby SSLContext.ecdh_curves =用法及代碼示例
- Ruby SSLContext.alpn_protocols用法及代碼示例
- Ruby SSLContext.npn_protocols用法及代碼示例
- Ruby SSLContext.npn_select_cb用法及代碼示例
- Ruby SSLConfig.new用法及代碼示例
- Ruby SSLSocket.open用法及代碼示例
- Ruby SSLSocket.accept_nonblock用法及代碼示例
- Ruby SSLSocket.connect_nonblock用法及代碼示例
- Ruby Symbol capitalize用法及代碼示例
- Ruby SizedQueue clear()用法及代碼示例
- Ruby Spotter.spot_op_asgn2_for_name用法及代碼示例
- Ruby StringScanner skip_until用法及代碼示例
- Ruby StringScanner search_full用法及代碼示例
- Ruby String.match?用法及代碼示例
- Ruby StringScanner.beginning_of_line?用法及代碼示例
- Ruby Stat.stat <=>用法及代碼示例
- Ruby Symbol.to_proc用法及代碼示例
- Ruby Symbol.end_with?用法及代碼示例
- Ruby StringScanner restsize用法及代碼示例
- Ruby Spotter.spot_opcall_for_name用法及代碼示例
- Ruby Set flatten()用法及代碼示例
注:本文由純淨天空篩選整理自ruby-lang.org大神的英文原創作品 SSLContext.tmp_dh =。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。