httparty
httparty copied to clipboard
Support extra chain cert
Summary
This change is to add extra chain cert support:
Currently, httparty does not support having multiple certs in the pem
option. The only way to pass in multiple certs is to use a ca_file and this pull request will add support to passing multiple certs without the need of a file.
Forgive my ignorance, because I know nothing about this, but is it a common thing or specification to do this?
Hi @jnunemaker,
This is a feature that's supported by Ruby Net Http but is not supported in Httparty. https://docs.ruby-lang.org/en/master/Net/HTTP.html
Users may want to pass in intermediate certificates. There is no current solution in httparty other than passing in a ca_file which requires a local file containing the certificates. If a repetitive task runs on multiple servers and the servers don't have the cert files on their disks, they need to create such files on the disks. Since passing in extra chain certificates is supported as an option in Net Http, we can simply handle this scenario by extracting and passing in the intermediate certificates without using files.
@wxwang33 the only thing we need on this now is specs. Can you get me an example file that has two certs like this? I can help wire up the specs for it.
Closing as stale but if someone wants to help get some specs for this I'll merge it.