Method: HTTPClient::SSLConfig#set_trust_ca
- Defined in:
- lib/httpclient/ssl_config.rb
#set_trust_ca(trust_ca_file_or_hashed_dir) ⇒ Object
Sets trust anchor certificate(s) for verification.
- trust_ca_file_or_hashed_dir
-
a filename of a PEM/DER formatted OpenSSL::X509::Certificate or a ‘c-rehash’eddirectory name which stores trusted certificate files.
Calling this method resets all existing sessions.
145 146 147 148 149 150 151 152 |
# File 'lib/httpclient/ssl_config.rb', line 145 def set_trust_ca(trust_ca_file_or_hashed_dir) if FileTest.directory?(trust_ca_file_or_hashed_dir) @cert_store.add_path(trust_ca_file_or_hashed_dir) else @cert_store.add_file(trust_ca_file_or_hashed_dir) end change_notify end |