toland / patron

Ruby HTTP client based on libcurl
http://toland.github.com/patron/
MIT License
541 stars 74 forks source link

how to set ssl client_key / client_cert ? #173

Open grosser opened 5 years ago

grosser commented 5 years ago

https://github.com/toland/patron/issues/84 is kinda similar, more docs in the readme would be nice

grosser commented 5 years ago

/cc @lenage because that ssl PR looks neat!

julik commented 5 years ago

@grosser Thanks for the issue, apologies I am finding it so late, I wasn't monitoring the patron repo as eagerly as I should have. I'll have a look, seems like we... don't have that option yet.

julik commented 5 years ago

Yes the PR mentioned does contain the options. Maybe it could be handy to rename the accessor methods for it to indicate that it is not the self-signed server certificate/CA but instead the client SSL cert. @grosser I can offer to finish the PR if you really need the functionality or you can pick it up if you have some spare time, it looks practically done

grosser commented 5 years ago

I'm not blocked for now, I was researching alternatives for our current net-http-persistent setup and this looked promising, I just could not get ssl to work :)

julik commented 5 years ago

Gotcha. For your use case: you need client certificates, a custom CA store, or both?

grosser commented 5 years ago

client cert+key see https://gist.github.com/grosser/db29a5d4bb268d097b6154ef85ff7478