るりまサーチ

最速Rubyリファレンスマニュアル検索!
29件ヒット [1-29件を表示] (0.042秒)
トップページ > クエリ:open[x] > クエリ:hostname=[x]

別のキーワード

  1. socket open
  2. _builtin open
  3. csv open
  4. tempfile open
  5. zlib open

ライブラリ

クラス

キーワード

検索結果

OpenSSL::SSL::SSLSocket#hostname=(hostname) (21100.0)

TLS の Server Name Indication(SNI) 拡張で利用するサーバのホスト名を設定します。

...そのため、
クライアント側が OpenSSL::SSL::SSLSocket#connect を呼ぶ前に
このメソッドでホスト名を指定する必要があります。

hostname に nil を渡すと SNI 拡張を利用しません。

サーバ側については OpenSSL::SSL::SSLContext#servername_cb= を...
...参照してください。

@param hostname ホスト名文字列
@see OpenSSL::SSL::SSLSocket#hostname,
Open
SSL::SSL::SSLContext#servername_cb,
Open
SSL::SSL::SSLContext#servername_cb=...

OpenSSL::SSL::SSLSocket (3006.0)

ソケットをラップして SSL での認証と暗号通信を実現するためのクラスです。

...require 'socket'
require 'openssl'
include OpenSSL

ctx = SSL::SSLContext.new
ctx.set_params(verify_mode: OpenSSL::SSL::VERIFY_PEER, verify_hostname: true)

soc = TCPSocket.new('www.example.com', 443)
ssl = SSL::SSLSocket.new(soc, ctx)
ssl.hostname = 'www.example.com' # SNI
ssl...
....connect
ssl.post_connection_check('www.example.com')
raise "verification error" if ssl.verify_result != OpenSSL::X509::V_OK
print ssl.peer_cert.to_text

# HTTP リクエストを送信
ssl.write("GET / HTTP/1.1\r\n")
ssl.write("Host: www.example.com\r\n")
ssl.write("Connection: clos...

NEWS for Ruby 3.0.0 (36.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...thand for `.to_a.join`.
* Set#<=> is added.
* Socket
* Add :connect_timeout to TCPSocket.new 17187
* Net::HTTP
* Net::HTTP#verify_hostname= and Net::HTTP#verify_hostname have been added to skip hostname verification. 16555
* Net::HTTP.get, Net::HTTP.get_response, and Net::HTTP.g...
...efault.
* OpenStruct
* Initialization is no longer lazy. 12136
* Builtin methods can now be overridden safely. 15409
* Implementation uses only methods ending with `!`.
* Ractor compatible.
* Improved support for YAML. 8382
* Use officially discouraged. Read OpenStruct@Cave...
...umerable#grep_v when passed a Regexp and no block no longer modify Regexp.last_match. 17030
* Requiring 'open-uri' no longer redefines `Kernel#open`. Call `URI.open` directly or `use URI#open` instead. 15893
* SortedSet has been removed for dependency and performance reasons.

== Stdlib compatib...