forked from loafle/openapi-generator-original
Don't force explicit configuration of CA cert location
In order to allow openssl to figure out the location of CA certificates on its own, don't apply the `ssl_ca_cert` configuration parameter if it is not explicitly set.
This commit is contained in:
parent
59a75072fd
commit
f85f885191
@ -75,10 +75,11 @@ module {{moduleName}}
|
|||||||
:ssl_verifypeer => @config.verify_ssl,
|
:ssl_verifypeer => @config.verify_ssl,
|
||||||
:sslcert => @config.cert_file,
|
:sslcert => @config.cert_file,
|
||||||
:sslkey => @config.key_file,
|
:sslkey => @config.key_file,
|
||||||
:cainfo => @config.ssl_ca_cert,
|
|
||||||
:verbose => @config.debugging
|
:verbose => @config.debugging
|
||||||
}
|
}
|
||||||
|
|
||||||
|
req_opts[:cainfo] = @config.ssl_ca_cert if @config.ssl_ca_cert
|
||||||
|
|
||||||
if [:post, :patch, :put, :delete].include?(http_method)
|
if [:post, :patch, :put, :delete].include?(http_method)
|
||||||
req_body = build_request_body(header_params, form_params, opts[:body])
|
req_body = build_request_body(header_params, form_params, opts[:body])
|
||||||
req_opts.update :body => req_body
|
req_opts.update :body => req_body
|
||||||
|
@ -75,10 +75,11 @@ module Petstore
|
|||||||
:ssl_verifypeer => @config.verify_ssl,
|
:ssl_verifypeer => @config.verify_ssl,
|
||||||
:sslcert => @config.cert_file,
|
:sslcert => @config.cert_file,
|
||||||
:sslkey => @config.key_file,
|
:sslkey => @config.key_file,
|
||||||
:cainfo => @config.ssl_ca_cert,
|
|
||||||
:verbose => @config.debugging
|
:verbose => @config.debugging
|
||||||
}
|
}
|
||||||
|
|
||||||
|
req_opts[:cainfo] = @config.ssl_ca_cert if @config.ssl_ca_cert
|
||||||
|
|
||||||
if [:post, :patch, :put, :delete].include?(http_method)
|
if [:post, :patch, :put, :delete].include?(http_method)
|
||||||
req_body = build_request_body(header_params, form_params, opts[:body])
|
req_body = build_request_body(header_params, form_params, opts[:body])
|
||||||
req_opts.update :body => req_body
|
req_opts.update :body => req_body
|
||||||
|
Loading…
x
Reference in New Issue
Block a user