Re: ssl client write / server accept seems broken

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 3/24/21 9:53 PM, Embedded Devel wrote:

On 3/23/21 11:06 PM, Matt Caswell wrote:


On 23/03/2021 15:47, Embedded Devel wrote:
Do you know if your application is statically linked or dynamically linked to OpenSSL?
Ive attached the code in question if it helps


and nope still have the errors



original code was deprecated, and changed from

/*      if ((ssl_con->ctx = SSL_CTX_new(TLSv1_server_method())) == NULL) { */
        if ((ssl_con->ctx = SSL_CTX_new(TLS_server_method())) == NULL) {

which also got added to the client side yet should have been

client should be

if ((ssl_con->ctx = SSL_CTX_new(TLS_client_method())) == NULL) {

not

if ((ssl_con->ctx = SSL_CTX_new(TLS_server_method())) == NULL) {



Looks like the original developer already tried to print the contents of the OpenSSL error stack:

        case SSL_ERROR_SSL:
            LOG(LOG_ERR, "%s: Error SSL_ERROR_SSL - return code: %d. %s\n", custom_prefix, ret_val, custom_msg);
            break;
    }

    ERR_print_errors_fp(stderr);fflush(stderr);

The errors seem to be going to "stderr" rather than via your "LOG" function. You don't show what "LOG" does but if it goes somewhere other than stderr then the errors are going somewhere different to your log file. Are you able to show us the stderr output from running your application?


just compiled with gcc, i see no -lstatic in the makefile ... ive attached the ssl .c and .h files in question if you want to see them

What does "ldd" show you for the application binary? i.e.

ldd name-of-you-binary-here


Matt



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux