Is it possible to connect to an API with SSL certificates, with Net::HTTP::Spore?
18 views
Skip to first unread message
Pierre M
unread,
Dec 1, 2013, 11:03:03 AM12/1/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to spore...@googlegroups.com
Hi, I want to connect to an API with a SSL certificate.
I'm guessing that it's not possible, because Net::HTTP::Spore uses HTTP::Request, which doesn't do this kind of thing. Is that right?
If so, is there a workaround?
--- Pierre Masci
Pierre M
unread,
Dec 1, 2013, 11:32:49 AM12/1/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to spore...@googlegroups.com
I managed, by looking at the internals of REST::Client and Net::HTTP::Spore::Role::UserAgent.
I could document it and send a pull request. Shall I?
--- Pierre Masci I check email a couple times daily; to reach me sooner, you can send me a text message via this page: https://awayfind.com/mascip
Pierre M
unread,
Dec 1, 2013, 11:33:27 AM12/1/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to spore...@googlegroups.com
PS: the solution is: $client->api_useragent->ssl_opts(SSL_cert_file => '/usr/lib/ssl/client-2048.crt'); $client->api_useragent->ssl_opts(SSL_key_file => '/usr/lib/ssl/client-2048.key');
--- Pierre Masci I check email a couple times daily; to reach me sooner, you can send me a text message via this page: https://awayfind.com/mascip