[OpenSIPS-Users] rest_api request to HTTPS site with pem file
Jonathan Hunter
hunterj91 at hotmail.com
Mon Jan 22 08:59:28 EST 2018
Perfect thanks Liviu!
Jon
________________________________
From: Users <users-bounces at lists.opensips.org> on behalf of Liviu Chircu <liviu at opensips.org>
Sent: 22 January 2018 12:55
To: users at lists.opensips.org
Subject: Re: [OpenSIPS-Users] rest_api request to HTTPS site with pem file
Using exec() is definitely a viable solution. Moreover, you can even wrap it around an async() call, so you don't hinder the SIP throughput.
Best regards,
Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com
[http://www.opensips-solutions.com/imgs/opensips-solutions-logo.gif]<http://www.opensips-solutions.com/>
Home — OpenSIPS Solutions<http://www.opensips-solutions.com/>
www.opensips-solutions.com
OpenSIPS is a mature Open Source implementation of a SIP server. OpenSIPS is more than a SIP proxy/router as it includes application-level functionalities.
On 22.01.2018 14:53, Jonathan Hunter wrote:
Hi Liviu,
Cool great news I will do that shortly on github and thanks for the response.
So in short term would you suggest I just look to execute my php script to fire the https request for the time being from within my opensips.cfg?
Many thanks
Jon
Get Outlook for iOS<https://aka.ms/o0ukef>
_____________________________
From: Liviu Chircu <liviu at opensips.org<mailto:liviu at opensips.org>>
Sent: Monday, January 22, 2018 12:38 pm
Subject: Re: [OpenSIPS-Users] rest_api request to HTTPS site with pem file
To: <users at lists.opensips.org<mailto:users at lists.opensips.org>>
Hi Jonathan,
Unfortunately, the rest_client module does not currently support custom SSL client certificates - you can only specify the "ssl_capath" in order to validate remote sites that you connect with. The good news is that adding this feature looks quite trivial [1], so we may as well throw it onto the 2.4 TODO list. Please open up a GitHub feature request [2] for this, and we'll go from there.
Best regards,
[1]: https://curl.haxx.se/libcurl/c/simplessl.html
[2]: https://github.com/OpenSIPS/opensips/issues
Liviu ChircuOpenSIPS Developerhttp://www.opensips-solutions.com
On 22.01.2018 14:07, Jonathan Hunter wrote:
Hi guys,
Sorry for this question!
I am looking to send an https request using an ssl cert with the rest_client module, and Im not sure how to achieve this and if its possible?
I have been testing with a php script which works fine using stream_context_set_option($ctx, 'ssl', 'local_cert', $pemfilename); to associate the certificate but wondered instead of referencing an external script I can just do the same using the rest_client?
I have setup SSL certs with the TLS module before, but not sure how to reference with the rest_client.
Do I just reference the .pem file within configuration file somewhere and add that as a rest_append_hf ?
Sorry if I have missed anything obvious.
Many thanks
Jon
_______________________________________________Users mailing listUsers at lists.opensips.org<mailto:Users at lists.opensips.org>http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
Users at lists.opensips.org<mailto:Users at lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20180122/688dc8d5/attachment-0001.html>
More information about the Users
mailing list