<p></p>

<h3>Description</h3>
<p>Am using Kamailio 5.1.9 version, In my tls.cfg i have one client and server profile,<br>
along with default client and server profile.</p>
<p>I have crl enabled for the non default client and server profile , the crl file size is 4 MB in my case.</p>
<p>I have 22 child tcp process.</p>
<p>With this what i observe is load_crl is taking close to 90 seconds to finish its execution and return.</p>
<h3>Expected behavior</h3>
<p>load_Crl function should not take 90 seconds to complete its execution.<br>
probably it should take in the range of 10-15 seconds to complete its execution or even lesser.</p>
<h4>Actual observed behavior</h4>
<p>load_Crl function is taking 90 seconds to complete its execution.</p>
<h4>Debugging Data</h4>
<p>It is very clear from the code, its because of this for loop.<br>
time taken to complete load_Crl execution is 90 seconds</p>
<p>procs_no=get_max_procs();<br>
for(i = 0; i < procs_no; i++) {<br>
if (SSL_CTX_load_verify_locations(d->ctx[i], d->crl_file.s, 0) != 1) {<br>
ERR("%s: Unable to load certificate revocation list '%s'\n",<br>
tls_domain_str(d), d->crl_file.s);<br>
TLS_ERR("load_crl:");<br>
return -1;<br>
}<br>
store = SSL_CTX_get_cert_store(d->ctx[i]);<br>
X509_STORE_set_flags(store,<br>
X509_V_FLAG_CRL_CHECK | X509_V_FLAG_CRL_CHECK_ALL);<br>
}</p>
<p>Is there a way this can be enhanced or as per the current kamailio design this is a must to do for each and every profile and its ssl context array list for each process and for every profile.</p>
<p>The same logic is seen in other load functions as well,  for example load_cert,<br>
load_ca_list,<br>
load_crl,<br>
set_cipher_list,<br>
set_verification,<br>
set_ssl_options,<br>
set_session_cache,<br>
ksr_tls_fix_domain,</p>
<h4>Log Messages</h4>

<pre><code>(paste your log messages here)
</code></pre>
<h4>SIP Traffic</h4>

<pre><code>(paste your sip traffic here)
</code></pre>
<h3>Possible Solutions</h3>
<p>Reply from Henning Westerholt on posting this problem to Users Mailing list</p>
<p>"But the code could be probably also improved, maybe it is possible to parallelize it. You can open a feature request about it,"</p>
<h3>Additional Information</h3>
<p>Kamailio 5.1.9 version</p>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>

<pre><code>Linux Kernel version :  3.10.0-693.el7.x86_64


Centos version : CentOS Linux release 7.4.1708 (Core)


CPU : 2 cores with model name      : Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz


[root@miv5000 ~]# cat /proc/meminfo
MemTotal:        3882076 kB
MemFree:          811244 kB
MemAvailable:    2320356 kB

 

Openssl verison : OpenSSL 1.0.2k-fips  26 Jan 2017
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2312">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZPTFPNZ5ZNLXOXSDKLRPVGHHANCNFSM4MYCR5TQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZMR2DMCGVJAIQDICYLRPVGHHA5CNFSM4MYCR5T2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4JDRAZIA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2312",
"url": "https://github.com/kamailio/kamailio/issues/2312",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>