るりまサーチ

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

別のキーワード

  1. openssl verify
  2. store verify
  3. request verify
  4. openssl verify_callback
  5. openssl verify_callback=

ライブラリ

クラス

モジュール

キーワード

検索結果

Net::HTTP#verify_mode -> Integer | nil (21101.0)

検証モードを返します。

検証モードを返します。

デフォルトは nil です。

Net::HTTP#verify_mode=(mode) (9107.0)

検証モードを設定します。

...検証モードを設定します。

詳しくは OpenSSL::SSL::SSLContext#verify_mode を見てください。
クライアント側なので、
OpenSSL::SSL::VERIFY_NONE か OpenSSL::SSL::VERIFY_PEER
のいずれかを用います。

デフォルトは nil で、VERIFY_NONE を意味します。...

OpenURI.open_uri(name, mode = 'r', perm = nil, options = {}) -> StringIO (156.0)

URI である文字列 name のリソースを取得して StringIO オブジェクト として返します。

...n_uri('http://www.example.com')
p sio.last_modified
puts sio.read

OpenURI.open_uri('http://www.example.com'){|sio| sio.read }

options には Hash を与えます。理解するハッシュの
キーは以下のシンボル、
* :proxy
* :progress_proc
* :content_length_proc
* :http_basic...
...http_basic_authentication
* :read_timeout
* :ssl_ca_cert
* :ssl_verify_mode
* :ftp_active_mode
* :redirect
です。
「:content_length_proc」と「:progress_proc」はプログレスバーに
利用されることを想定しています。

require 'open-uri'
sio = OpenURI.open_uri('http...
...{ :proxy => 'http://proxy.example.com:8000/',
:http_basic_authentication => [username, password] })

: :proxy
プロクシの設定をします。
値には以下のいずれかを与えます。
//emlist{
文字列: "http://proxy.example.com:800...

OpenURI.open_uri(name, mode = 'r', perm = nil, options = {}) {|sio| ... } -> nil (156.0)

URI である文字列 name のリソースを取得して StringIO オブジェクト として返します。

...n_uri('http://www.example.com')
p sio.last_modified
puts sio.read

OpenURI.open_uri('http://www.example.com'){|sio| sio.read }

options には Hash を与えます。理解するハッシュの
キーは以下のシンボル、
* :proxy
* :progress_proc
* :content_length_proc
* :http_basic...
...http_basic_authentication
* :read_timeout
* :ssl_ca_cert
* :ssl_verify_mode
* :ftp_active_mode
* :redirect
です。
「:content_length_proc」と「:progress_proc」はプログレスバーに
利用されることを想定しています。

require 'open-uri'
sio = OpenURI.open_uri('http...
...{ :proxy => 'http://proxy.example.com:8000/',
:http_basic_authentication => [username, password] })

: :proxy
プロクシの設定をします。
値には以下のいずれかを与えます。
//emlist{
文字列: "http://proxy.example.com:800...

OpenSSL::SSL::SSLSocket (18.0)

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

...バに接続して write します。

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.h...
...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: close\r\n")
ssl.write("\r\n")
print ssl.re...

絞り込み条件を変える