Re: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Hello, I have seen your update. Try Using SSLv3_client_method() instead of SSLv23_client_method(),if you did not try it previously. Refer this Link https://rt.openssl.org/Ticket/Display.html?id=2240user=guestpass=guest Regards Gangadhar -- View this message in context: http://openssl.6102.n7.nabble.com/error-140770FC-SSL-routines-SSL23-GET-SERVER-HELLO-unknown-protocol-tp25096p49067.html Sent from the OpenSSL - User mailing list archive at Nabble.com. __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org
RE: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
From: owner-openssl-us...@openssl.org On Behalf Of Rij Sent: Thursday, 23 July, 2009 21:17 I have a simple client operating in blocking mode. When I try to connect to the server, I get the error: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol Sounds like your server is not responding with valid SSL. Are you sure you are connecting to the correct server and port? Can you try connecting with openssl s_client -debug? Does it get data that looks like some other protocol (at best, a readable one)? Maybe the server requires STARTTLS or similar interaction BEFORE starting TLS? Anybody aware of this error? I had previously written both a blocking and non-blocking client with help of people from this forum (most notably David). Now, the code doesn't run. Here's a snapshot of the code. SSL_library_init(); ERR_load_BIO_strings(); SSL_load_error_strings(); OpenSSL_add_all_algorithms(); Asides: BIO errstrings are (also) loaded by SSL_load_error_strings, and if you're (only) doing SSL you shouldn't need any algorithms not included by SSL_library_init. But these (should) do no harm. __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org
Re: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Hi Dave, Thanks for your reply. I was able to fix it a while ago. And your guess is correct. My port number was getting messed up. And extra thinks for the tip on the libraries. :) On Mon, Jul 27, 2009 at 1:31 PM, Dave Thompsondave.thomp...@princetonpayments.com wrote: From: owner-openssl-us...@openssl.org On Behalf Of Rij Sent: Thursday, 23 July, 2009 21:17 I have a simple client operating in blocking mode. When I try to connect to the server, I get the error: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol Sounds like your server is not responding with valid SSL. Are you sure you are connecting to the correct server and port? Can you try connecting with openssl s_client -debug? Does it get data that looks like some other protocol (at best, a readable one)? Maybe the server requires STARTTLS or similar interaction BEFORE starting TLS? Anybody aware of this error? I had previously written both a blocking and non-blocking client with help of people from this forum (most notably David). Now, the code doesn't run. Here's a snapshot of the code. SSL_library_init(); ERR_load_BIO_strings(); SSL_load_error_strings(); OpenSSL_add_all_algorithms(); Asides: BIO errstrings are (also) loaded by SSL_load_error_strings, and if you're (only) doing SSL you shouldn't need any algorithms not included by SSL_library_init. But these (should) do no harm. __ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-us...@openssl.org Automated List Manager majord...@openssl.org __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Hello, I have a simple client operating in blocking mode. When I try to connect to the server, I get the error: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol Anybody aware of this error? I had previously written both a blocking and non-blocking client with help of people from this forum (most notably David). Now, the code doesn't run. Here's a snapshot of the code. SSL_library_init(); ERR_load_BIO_strings(); SSL_load_error_strings(); OpenSSL_add_all_algorithms(); ctx = SSL_CTX_new(SSLv23_client_method()); if(!SSL_CTX_load_verify_locations(ctx, mycert.pem, NULL)) { SSL_CTX_free(ctx); return NULL; } ssl = SSL_new(ctx); sbio = BIO_new_socket(server_socket,BIO_NOCLOSE); SSL_set_bio(handle-ssl,sbio,sbio); SSL_connect(handle-ssl); bytes_sent = SSL_write(handle-ssl, (handle-content + handle-offset), handle-length); switch(SSL_get_error(handle-ssl, bytes_sent)) { case SSL_ERROR_NONE: printf(Success\n); break; case SSL_ERROR_SSL: printf(general error: %s\n, ERR_error_string(ERR_get_error(), NULL)); break; } __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org