XMLRPC client cannot alter SSL options for _async calls
In relation to #8461
It's now easy to set SSL options like
ca_path but doing an
_async call creates a new connection without these options present.
I think SSL options should be configurable in the xmlrpc client itself and it pass them down to whatever HTTP connections are later created.
Updated by akostadinov (Aleksandar Kostadinov) about 5 years ago
e.g. if you do
xmlrpc_client.http.ca_file = @options[:ca_file]
xmlrpc_client.call(...) will work but not the following:
At the moment I'm using a monkey patch workaround like this:
xmlrpc_client.http.ca_path = @options[:ca_path] xmlrpc_client.instance_variable_set(:@ca_path, @options[:ca_path]) def xmlrpc_client.net_http(host, port, proxy_host, proxy_port) h = Net::HTTP.new host, port, proxy_host, proxy_port h.ca_path = @ca_path h end
Updated by tenderlovemaking (Aaron Patterson) almost 5 years ago
zzak (Zachary Scott): This seems like an issue with the XMLRPC client, not openssl?
It seems like XMLRPC should take an http object as a parameter to initialize like:
http = Net::HTTP.new *args http.ca_path = ca_path rpc = XMLRPC::Client.new http ...
I'm not sure what implications that would have on the internals though. For now you could work around by subclassing the client rather than monkey patching:
class MyClient < XMLRPC::Client def net_http(*args) http = super http.ca_path = blah http end end MyClient.new
Updated by zzak (Zachary Scott) almost 5 years ago
- Assignee changed from openssl to kou (Kouhei Sutou)
This seems like an issue with the XMLRPC client, not openssl?
Whoops, I must have assigned by accident when I was re-assigning openssl related tickets.
I've re-assigned this ticket to Sutou san who's listed as the current maintainer. I have no idea about this ticket.