<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font face="monospace">Hi Yury,<br>
<br>
I'm afraid this is not possible (to fetch the cert from an
external source at runtime). A dirty hack may be to (1) do the
rest and fetch the cert + key, (2) to insert into (from script)
into the tls_mgm db table and (3) fire an MI tls_reload cmd (from
script) via the mi() script function [1]<br>
<br>
[1]
<a class="moz-txt-link-freetext" href="https://opensips.org/html/docs/modules/3.2.x/mi_script.html#func_mi">https://opensips.org/html/docs/modules/3.2.x/mi_script.html#func_mi</a><br>
<br>
and yeah, I know, it is ugly :(<br>
<br>
Best regards,<br>
</font>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
OpenSIPS eBootcamp 23rd May - 3rd June 2022
<a class="moz-txt-link-freetext" href="https://opensips.org/training/OpenSIPS_eBootcamp_2022/">https://opensips.org/training/OpenSIPS_eBootcamp_2022/</a></pre>
<div class="moz-cite-prefix">On 3/15/22 1:45 PM, Yury Kirsanov
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAD1_sesJSFOCmtWwsenr39s=gGMAsNbukcMZUBoJOugVHoWK7g@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hi,
<div>I've got a question, is there any way to pass SSL
certificate and key as a parameter to the tls_mgm module
during script execution? For example, first I do a REST
request to our REST API server which returns me all required
parameters including certificate and key. Then I'd like to use
this response as a client certificate for outgoing connection
to some TLS-enabled server. Is there any way to do that? I
know I can use DB module and select a client certificate using
avp variable, but that's not convenient as it requires
tls_reload MI command each time the DB is updated.</div>
<div><br>
</div>
<div>Thanks and best regards,</div>
<div>Yury.</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>