[OpenSIPS-Users] Support for https in async

Ramachandran, Agalya (Contractor) Agalya_Ramachandran at comcast.com
Tue Nov 8 18:10:27 CET 2016


Hi Liviu,

Thank you for response. I have few questions, can you please clarify me on these.


*         Is there is a roadmap in future targeting async() to handle https queries?

*         In start_async_http_request(), why is curl_multi_wait is not used to overcome 1024 fds limitation? and is there plan to use it in future?

*         What is the use of read_fds[] in rest_methods.c and who uses it?

*         Why select() is not used ?


Regards,
Agalya
From: Liviu Chircu [mailto:liviu at opensips.org]
Sent: Monday, October 31, 2016 12:27 PM
To: Ramachandran, Agalya (Contractor) <Agalya_Ramachandran at comcast.com>; OpenSIPS users mailling list <users at lists.opensips.org>
Subject: Re: Support for https in async


Hi, Agalya!

We have not done any development in that direction, and I assume it won't work out of the box, as we need to instruct libcurl on where to find the CA certificate before we can expect it to establish the TLS connection. As an alternative, we could add the option of disabling host/peer verifications like here [1]

[1]: https://curl.haxx.se/libcurl/c/https.html

Liviu Chircu

OpenSIPS Developer

http://www.opensips-solutions.com
On 31.10.2016 16:41, Ramachandran, Agalya (Contractor) wrote:
Hi team,

Have you tried with https://url with async and does that work without issue ?
When I try, resume_async_http_req is called, but crash is occurring at libcurl library. So helpless to debug further.
async(rest_put("https://url"<https://url>, "$fU,$tU,$ci ", "application/json", "$var(body)", "$var(ct)", "$var(rcode)"),resume);

My question is crash occring only in my scenario or  OpenSIPS doesn't support async as https?
Here is my dump just in case for reference.

#0  0x00007f567248da1e in Curl_raw_nequal () from /lib64/libcurl.so.4
#1  0x00007f567245bd0f in Curl_checkheaders () from /lib64/libcurl.so.4
#2  0x00007f567245d1e5 in Curl_http () from /lib64/libcurl.so.4
#3  0x00007f567246db4b in Curl_do () from /lib64/libcurl.so.4
#4  0x00007f567247da1b in multi_runsingle () from /lib64/libcurl.so.4
#5  0x00007f567247e121 in curl_multi_perform () from /lib64/libcurl.so.4
#6  0x00007f56726b75ca in resume_async_http_req (fd=9, msg=0x7f56739c0640 <faked_req.10404>, _param=0x7f56b3e354d0)
    at rest_methods.c:380
#7  0x00007f56737771ff in t_resume_async (fd=0x7f56b3e26840, param=0x7f567405c3e8) at async.c:125
#8  0x0000000000509975 in handle_io (fm=0x7f56b3e26840, idx=1, event_type=1) at net/net_udp.c:267
#9  0x00000000005082b3 in io_wait_loop_epoll (h=0x806e00 <_worker_io>, t=1, repeat=0) at net/../io_wait_loop.h:221
#10 0x0000000000509c30 in udp_rcv_loop (si=0x7f56b3dd6808) at net/net_udp.c:308
#11 0x000000000050a1c8 in udp_start_processes (chd_rank=0x7d30e8 <chd_rank.10706>, startup_done=0x0) at net/net_udp.c:372
#12 0x0000000000492304 in main_loop () at main.c:671
#13 0x0000000000494d8f in main (argc=7, argv=0x7fff38a979f8) at main.c:1261

Regards,
Agalya


From: Ramachandran, Agalya (Contractor)
Sent: Thursday, October 27, 2016 4:24 PM
To: users at lists.opensips.org<mailto:users at lists.opensips.org>; 'Liviu Chircu' <liviu at opensips.org><mailto:liviu at opensips.org>
Subject: Support for https in async

Hi team,

Just a quick question.. Does async(), method supports https request?
When I try to use https, resume_async_http_req is called, but I never got the response and rather OpenSIPS crashed at libcurl.

Regards,
Agalya

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20161108/92b32107/attachment-0001.htm>


More information about the Users mailing list