<div dir="auto"></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 24, 2021, 10:54 PM Embedded Devel <<a href="mailto:lists@optimcloud.com">lists@optimcloud.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
On 3/23/21 11:06 PM, Matt Caswell wrote:<br>
><br>
><br>
> On 23/03/2021 15:47, Embedded Devel wrote:<br>
>>> Do you know if your application is statically linked or dynamically <br>
>>> linked to OpenSSL?<br>
>> Ive attached the code in question if it helps<br>
<br>
original code was deprecated, and changed from<br>
<br>
/*      if ((ssl_con->ctx = SSL_CTX_new(TLSv1_server_method())) == NULL) <br>
{ */<br>
         if ((ssl_con->ctx = SSL_CTX_new(TLS_server_method())) == NULL) {<br>
<br>
which also got added to the client side yet should have been<br>
<br>
client should be<br>
<br>
if ((ssl_con->ctx = SSL_CTX_new(TLS_client_method())) == NULL) {<br>
<br>
not<br>
<br>
if ((ssl_con->ctx = SSL_CTX_new(TLS_server_method())) == NULL) {<br>
<br>
<br>
><br>
> Looks like the original developer already tried to print the contents <br>
> of the OpenSSL error stack:<br>
><br>
>         case SSL_ERROR_SSL:<br>
>             LOG(LOG_ERR, "%s: Error SSL_ERROR_SSL - return code: %d. <br>
> %s\n", custom_prefix, ret_val, custom_msg);<br>
>             break;<br>
>     }<br>
><br>
>     ERR_print_errors_fp(stderr);fflush(stderr);<br>
><br>
> The errors seem to be going to "stderr" rather than via your "LOG" <br>
> function. You don't show what "LOG" does but if it goes somewhere <br>
> other than stderr then the errors are going somewhere different to <br>
> your log file. Are you able to show us the stderr output from running <br>
> your application?<br>
><br>
><br>
>> just compiled with gcc, i see no -lstatic in the makefile ... ive <br>
>> attached the ssl .c and .h files in question if you want to see them<br>
><br>
> What does "ldd" show you for the application binary? i.e.<br>
><br>
> ldd name-of-you-binary-here<br>
><br>
><br>
> Matt<br>
</blockquote></div>