<div dir="ltr">Hi Matt,<div><br></div><div>Thank you for the inputs. </div><div>I have one more query. Is it appropriate to check for the errno in this case and take action based on the errno values ?</div><div><br></div><div>Thanks</div><div>Mahendra</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 19, 2020 at 3:09 PM Matt Caswell <<a href="mailto:matt@openssl.org">matt@openssl.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
On 19/02/2020 05:16, Mahendra SP wrote:<br>
> Hi All,<br>
> <br>
> We are using Openssl version 1.0.2h. When we call SSL_do_handshake,<br>
> sometimes we notice that handshake fails with error SSL_ERROR_SSL. <br>
> As per the documentation for this error, it is non recoverable and fatal<br>
> error.  Documentation also mentions to check the error queue for further<br>
> details. Does it mean, calling SSL_get_error after SSL_ERROR_SSL will<br>
> give exact reason for this failure? <br>
<br>
OpenSSL has its own error stack. SSL_ERROR_SSL means that you should<br>
look at that error stack for further details about what caused the<br>
problem. For example you can use ERR_print_errors_fp() to print all the<br>
error descriptions to stdout/stderr:<br>
<br>
<a href="https://www.openssl.org/docs/man1.1.1/man3/ERR_print_errors_fp.html" rel="noreferrer" target="_blank">https://www.openssl.org/docs/man1.1.1/man3/ERR_print_errors_fp.html</a><br>
<br>
You can get more fine grained control of the error stack using the<br>
various ERR_* functions available. See:<br>
<br>
<a href="https://www.openssl.org/docs/man1.1.1/man3/" rel="noreferrer" target="_blank">https://www.openssl.org/docs/man1.1.1/man3/</a><br>
<br>
Matt<br>
</blockquote></div>