Method: HTTPClient::SSLConfig#set_client_cert_file
- Defined in:
- lib/httpclient/ssl_config.rb
#set_client_cert_file(cert_file, key_file, pass = nil) ⇒ Object
Sets certificate and private key for SSL client authentication.
- cert_file
-
must be a filename of PEM/DER formatted file.
- key_file
-
must be a filename of PEM/DER formatted file. Key must be an RSA key. If you want to use other PKey algorithm, use client_key=.
Calling this method resets all existing sessions if value is changed.
179 180 181 182 183 184 |
# File 'lib/httpclient/ssl_config.rb', line 179 def set_client_cert_file(cert_file, key_file, pass = nil) if (@client_cert != cert_file) || (@client_key != key_file) || (@client_key_pass != pass) @client_cert, @client_key, @client_key_pass = cert_file, key_file, pass change_notify end end |