<p dir="ltr">Following works :</p>
<p dir="ltr">If(BIO_should_read(socket->ssl_bio) != 0)</p>
<p dir="ltr">If(BIO_should_write(socket->ssl_bio) != 0)<br>
       <br>
With this, I could get the entire end-to-end workflow to work !!!!<br></p>
<p dir="ltr">Thanks a ton for all the help !!!<br></p>
<div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 10, 2016 at 11:50 AM, Ajay Garg <span dir="ltr"><<a href="mailto:ajaygargnsit@gmail.com" target="_blank">ajaygargnsit@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi All.<br><br><div>Taking the socket-structure as ::<br><br>##############################<wbr>##############################<wbr>##############################<wbr>#######<br></div><div>           SSL *ssl;<br><br></div><div>           BIO *ssl_bio;                 // app-payload-bytes will be written by app into it.<br></div><div>           BIO *inter_bio;               // intermediate-bio, have no idea what it really is used for.<br></div><div>          
 BIO *network_bio;          // app-payload-encrypted-bytes will "emerge"
 from this bio, ready to be written over the wire<br></div>##############################<wbr>##############################<wbr>##############################<wbr>#######<br><br></div><br><br><br>and assuming all initialization went fine, what is the correct way to get the retry-reason ::<br><br>##############################<wbr>##############################<wbr>##############################<wbr>#######<br>        if(BIO_should_retry(socket->ss<wbr>l_bio) != 0)<br>        {            <br><div>              int reason =  BIO_get_retry_reason(socket->s<wbr>sl_bio);<br>        }<br><br></div><div>                              <wbr>                OR<br><br></div><div>        if(BIO_should_retry(socket->ss<wbr>l_bio) != 0)<br>        {            <br>              int reason = BIO_get_retry_reason(BIO_get_r<wbr>etry_BIO(socket->ssl_bio, NULL));<br>        }<br>##############################<wbr>##############################<wbr>##############################<wbr>#######<br><br><br></div><div>Right now, I am receiving 0 (zero) as the reason in both the cases, and none of SSL_ERROR_WANT_WRITE or SSL_ERROR_WANT_READ (in either case).<br><br><br></div><div>Thanks and Regards,<br></div><div>Ajay<span class="m_-206558896324267542HOEnZb"><font color="#888888"><br></font></span></div><span class="m_-206558896324267542HOEnZb"><font color="#888888"><div>         <br><br clear="all"><div><br>-- <br><div class="m_-206558896324267542m_-9151793678127270261gmail_signature">Regards,<br>Ajay<br></div>
</div></div></font></span></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="m_-206558896324267542gmail_signature" data-smartmail="gmail_signature">Regards,<br>Ajay<br></div>
</div>