laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36506?usp=email )
(
5 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: HTTP_Adapter: Allow API users to enable/disable SSL ......................................................................
HTTP_Adapter: Allow API users to enable/disable SSL
At the moment HTTP_Adapter has no option to enable SSL
Related: SYS#6824 Change-Id: I6487deea50cd9b4ed4905d9a3a78e00def8ea319 --- M library/HTTP_Adapter.ttcn 1 file changed, 15 insertions(+), 2 deletions(-)
Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve
diff --git a/library/HTTP_Adapter.ttcn b/library/HTTP_Adapter.ttcn index c06aa38..d26cce5 100644 --- a/library/HTTP_Adapter.ttcn +++ b/library/HTTP_Adapter.ttcn @@ -24,7 +24,8 @@
type record HTTP_Adapter_Params { charstring http_host, - integer http_port + integer http_port, + boolean use_ssl };
function f_http_init(HTTP_Adapter_Params pars) runs on http_CT { @@ -128,7 +129,7 @@ function f_http_tx_request(charstring url, charstring method := "GET", template charstring body := omit, HeaderLines custom_hdr := { }) runs on http_CT { - HTTP.send(ts_HTTP_Connect(g_pars.http_host, g_pars.http_port)); + HTTP.send(ts_HTTP_Connect(g_pars.http_host, g_pars.http_port, g_pars.use_ssl)); HTTP.receive(Connect_result:?); HTTP.send(ts_HTTP_Req(url, method, body, host := g_pars.http_host & ":" & int2str(g_pars.http_port), custom_hdr := custom_hdr)); }