Class: WinRM::HTTP::ClientCertAuthSSL
- Inherits:
-
HttpTransport
- Object
- HttpTransport
- WinRM::HTTP::ClientCertAuthSSL
- Defined in:
- lib/winrm/http/transport.rb
Overview
Uses Client Certificate to authenticate and SSL to secure the transport
Instance Attribute Summary
Attributes inherited from HttpTransport
Instance Method Summary collapse
-
#initialize(endpoint, client_cert, client_key, key_pass, opts) ⇒ ClientCertAuthSSL
constructor
A new instance of ClientCertAuthSSL.
Methods inherited from HttpTransport
#basic_auth_only!, #no_ssl_peer_verification!, #no_sspi_auth!, #send_request, #ssl_peer_fingerprint_verification!, #verify_ssl_fingerprint, #with_untrusted_ssl_connection
Constructor Details
#initialize(endpoint, client_cert, client_key, key_pass, opts) ⇒ ClientCertAuthSSL
Returns a new instance of ClientCertAuthSSL.
279 280 281 282 283 284 285 286 287 |
# File 'lib/winrm/http/transport.rb', line 279 def initialize(endpoint, client_cert, client_key, key_pass, opts) super(endpoint, opts) @httpcli.ssl_config.set_client_cert_file(client_cert, client_key, key_pass) @httpcli.www_auth.instance_variable_set('@authenticator', []) no_ssl_peer_verification! if opts[:no_ssl_peer_verification] @ssl_peer_fingerprint = opts[:ssl_peer_fingerprint] @httpcli.ssl_config.set_trust_ca(opts[:ca_trust_path]) if opts[:ca_trust_path] @httpcli.ssl_config.cert_store = opts[:cert_store] if opts[:cert_store] end |