dexter has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36506?usp=email )
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, 16 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/06/36506/1
diff --git a/library/HTTP_Adapter.ttcn b/library/HTTP_Adapter.ttcn
index 968b44f..0c8b5c8 100644
--- a/library/HTTP_Adapter.ttcn
+++ b/library/HTTP_Adapter.ttcn
@@ -21,12 +21,14 @@
port HTTPmsg_PT HTTP;
var charstring g_http_host;
var integer g_http_port;
+ var boolean g_use_ssl;
};
-function f_http_init(charstring host, integer http_port) runs on http_CT {
+function f_http_init(charstring host, integer http_port, boolean use_ssl := false) runs
on http_CT {
map(self:HTTP, system:HTTP);
g_http_host := host;
g_http_port := http_port;
+ g_use_ssl := use_ssl;
}
template (value) Connect ts_HTTP_Connect(template (value) charstring hostname,
@@ -117,7 +119,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_http_host, g_http_port));
+ HTTP.send(ts_HTTP_Connect(g_http_host, g_http_port, g_use_ssl));
HTTP.receive(Connect_result:?);
HTTP.send(ts_HTTP_Req(url, method, body, host := g_http_host & ":" &
int2str(g_http_port), custom_hdr := custom_hdr));
}
--
To view, visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36506?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I6487deea50cd9b4ed4905d9a3a78e00def8ea319
Gerrit-Change-Number: 36506
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange