<p>Using latest 1.11.5 version (from github) and 1.11.3 It seems to be a problem using tls connections with mutual auth (require client certificate=1)</p>

<p>Under a bit of load (about 30 AORs) I started to see failed calls and the log messages:<br>
ERROR:core:tls_print_errstack: TLS errstack: error:140890C7:SSL routines:SSL3_GET_CLIENT_CERTIFICATE:peer did not return a certificate (with tls_verify_client = 1 )<br>
and <br>
ERROR:core:tls_print_errstack: TLS errstack: error:14094412:SSL routines:SSL3_READ_BYTES:sslv3 alert bad certificate  (with tls_verify_client = 0)</p>

<p>The errors seems to be random, the more load I have the more errors I can see. The process is always the same:<br>
OpenSips receive an invite with certificate validated OK and challenge for a password. When the UAC send another invite with the response to the challenge the connection is droped with message like "SSL3_READ_BYTES:sslv3 alert bad certificate" </p>

<p>I tried changing the poll method, disabling tcp aliases, in tcp sync and async mode, changing the MTU of the network, changing the proxy certificate, opensips versions,...  nothing seems to work.</p>

<p>The Opensips is compiled under Debian 8.2 and I tested with grandstream phones and Acrobits cloud softphone, with the same simptoms. Maybe there is a bug int the TLS stack?</p>

<p>Iĺl try to attach a full debug log to the isssue (scrubbed) You can see the error in line 206 and the first invite at line 10</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/issues/670">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOcibyCOBsFaMTDNhhTTVNGQq7c41dqks5o5-bqgaJpZM4GMOoH.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/OpenSIPS/opensips/issues/670"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>