<div dir="ltr">Hi,<div><br></div><div>This issue occur purely based on the time (sequence of events) at which SSL read_state_machine enter the post processing of certificate verify which is received from client.</div><div><br></div><div>Handshake works fine if the certificate verify post processing is done before the next message arrives at SCTP socket layer (In your case may be there is a delay in receiving the next message at SCTP layer). Handshake works fine even in my environment some times. </div><div><br></div><div><br></div><div>I added some debug statements, below is the debug statements. </div><div><br></div><div><b><br></b></div><div><b>Debug statements when the handshake does not work</b></div><div><br></div><div><img src="cid:ii_15b8c76fef4502d9" alt="Inline image 1" width="472" height="365"><br></div><div><br></div><div><div>Length of the next packet (Cipher spec change) is exactly 14 as i mentioned  in - <a href="https://github.com/openssl/openssl/issues/3251">https://github.com/openssl/openssl/issues/3251</a></div></div><div><br></div><div><b>Debug logs when the handshake is successful</b></div><div><br></div><div><img src="cid:ii_15b8c849736c35c0" alt="Inline image 3" width="472" height="275"><br></div><div><br></div><div>If no message is waiting to be received at socket layer then handshake is successful. If message is waiting to be received at socket layer then the handshake will never be completed. </div><div><br></div><div><br></div><div>Thanks,</div><div>Mahesh G S</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 20, 2017 at 7:17 PM, Martin Brejcha <span dir="ltr"><<a href="mailto:martin.brejcha@mavenir.com" target="_blank">martin.brejcha@mavenir.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
<br>
Matt Caswell wrote on 04/20/2017 03:23 PM:<br>
><br>
><br>
> On 20/04/17 14:19, Martin Brejcha wrote:<br>
>><br>
>><br>
>> Matt Caswell wrote on 04/20/2017 01:29 PM:<br>
>>><br>
>>><br>
>>> On 20/04/17 12:26, mahesh gs wrote:<br>
>>>> Hi Matt,<br>
>>>><br>
>>>> Yes I raised github case for the same issue. I also tried running this<br>
>>>> call flow with the latest SNAPSHOT code (openssl-SNAP-20170419) and<br>
>>>> handshake is successful with the latest SNAPSHOT code which is not an<br>
>>>> official release.<br>
>>>><br>
>>>> I checked the github repo history and observer that during commits on<br>
>>>> (11 th Jan) as a part of "Move state machine knowledge out of the record<br>
>>>> layer".  "renegotiate" bit that is set to "2" in function<br>
>>>> "tls_post_process_client_<wbr>hello" has been removed. May be that is causing<br>
>>>> the call flow to be successful in the latest SNAPSHOT release.<br>
>>>><br>
>>>> I am assuming commits that are done on 11th Jan or later are not part of<br>
>>>> release openssl 01.01.00e<br>
>>><br>
>>> Ah. No. That commit is in the dev branch only (scheduled for version<br>
>>> 1.1.1) and won't be backported to the 1.1.0 branch. I can see why that<br>
>>> commit might help things, but probably a different solution is more<br>
>>> appropriate for 1.1.0.<br>
>>><br>
>>> I'm looking at this issue at the moment.<br>
>>><br>
>>> Matt<br>
>>><br>
>><br>
>> hi,<br>
>><br>
>> btw: I've tested similar scenario and handshake works fine.<br>
>> test env: client and server on different VMs (rhel7.2, openssl 1.1.0e, non-blocking sockets and segmented certificate)<br>
>> So, it should work also with 1.1.0e version.<br>
><br>
> Thanks. Did your handshake include client auth? I think this issue only<br>
> arises in that case.<br>
><br>
> Matt<br>
><br>
><br>
<br>
</div></div>yes, client auth with segmented certificate has been included.<br>
<br>
Martin<br>
<br>
<br>
<br>
><br>
><br>
<br>--<br>
openssl-users mailing list<br>
To unsubscribe: <a href="https://mta.openssl.org/mailman/listinfo/openssl-users" rel="noreferrer" target="_blank">https://mta.openssl.org/<wbr>mailman/listinfo/openssl-users</a><br>
<br></blockquote></div><br></div>