Hello! I think I have found a bug in OpenSSL on AIX 5.3 64-bit platform.
When I try to connect by https from AIX to another host from multi-thread application by curl, I have got error message SSL_CONNECT_ERROR "Unknown SSL protocol error in connection to ...". After debugging I have found in bss_sock.c file in BIO_sock_should_retry function ifdef statement (#if defined(OPENSSL_SYS_WINDOWS) && 0), that incapsulate handling of non-blocking socket returns. I think so, because in sock_read function calling readsocket returns -1 and set errno to 0, and it' normal for non-blocking sockets. But then BIO_sock_should_retry returns false, because it didn't execute code under ifdef statement. When I remove this ifdef the application starts work correctly. Best regards, Aidar.Hello!
I think I have found a bug in OpenSSL on AIX 5.3 64-bit platform.
When I try to connect by https from AIX to another host from multi-thread application by curl, I have got error message SSL_CONNECT_ERROR "Unknown SSL protocol error in connection to ...". After debugging I have found in bss_sock.c file in BIO_sock_should_retry function ifdef statement (#if defined(OPENSSL_SYS_WINDOWS) && 0), that incapsulate handling of non-blocking socket returns. I think so, because in sock_read function calling readsocket returns -1 and set errno to 0, and it' normal for non-blocking sockets. But then BIO_sock_should_retry returns false, because it didn't execute code under ifdef statement. When I remove this ifdef the application starts work correctly.
Best regards,
Aidar.