Sorry, just notice it, it might be sent out my 2 years old son by accident. please ignore this email. Regards,Pingzhong
> Subject: Re: SSMTP Client: SSL routines:SSL23_GET_SERVER_HELLO > From: lipzh...@hotmail.com > Date: Mon, 17 Mar 2014 21:13:20 -0400 > To: openssl-users@openssl.org > > U > P > > Sent from my iPad > > > On Mar 17, 2014, at 5:48 PM, "hhachem" <hamze.hac...@deos-ag.com> wrote: > > > > openssl_capture.txt > > <http://openssl.6102.n7.nabble.com/file/n48871/openssl_capture.txt> Hello, > > > > I'm using OpenSSL in order to encrypt some emails, that a piece of hardware > > sends. But, whenever I try to call SSL_connect(), I get : SSL > > routines:SSL23_GET_SERVER_HELLO:unknown protocol > > > > After sending "EHLO" and "STARTTLS" I call the following function: > > /////////////////////////////////////////////////////////////////////////////////////////////// > > SSL_CTX *ctx = NULL; > > SSL *ssl = NULL; > > > > void CreateTLSSession(int sockfd) > > { > > printf("///////////////creating TLS > > Session/////////////////////\n"); > > SSL_library_init(); > > SSL_load_error_strings(); > > OpenSSL_add_all_algorithms(); > > ctx = SSL_CTX_new(SSLv23_client_method()); > > if (ctx == NULL) > > { > > printf("failed to initialize context\n"); > > return; > > } > > SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2); > > ssl = SSL_new(ctx); > > if (!SSL_set_fd(ssl, sockfd)) > > { > > printf("failed to bind to socket fd\n"); > > return; > > } > > if (SSL_connect(ssl) < 1) > > { > > ERR_print_errors_fp(stdout); > > fflush(stdout); > > printf("SSL_connect failed\n"); > > return; > > } > > } > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > I've tried connecting to : > > > > smtp.live.com : 587 --> SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol > > s23_clnt.c:787: > > smtp.live.com : 25 --> SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol > > s23_clnt.c:787: > > smtp.gmail.com : 587 --> SSL routines:SSL23_GET_SERVER_HELLO:unknown > > protocol s23_clnt.c:787: > > smtp.gmail.com : 465 --> no response from server at all! > > smtp.gmail.com : 25 --> SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol > > s23_clnt.c:787: > > > > > > Am I missing something here? > > > > UPDATE: > > > > All other methods (i.e. TLSv1_1_method(), SSLv3_method() ...) lead to > > SSL3_GET_RECORD:wrong version number > > > > > > UPDATE: I've managed to sniff the network traffic using wireshark. The .txt > > capture file is attached. > > > > > > Any help will be appreciated > > > > > > > > -- > > View this message in context: > > http://openssl.6102.n7.nabble.com/SSMTP-Client-SSL-routines-SSL23-GET-SERVER-HELLO-tp48871.html > > Sent from the OpenSSL - User mailing list archive at Nabble.com. > > ______________________________________________________________________ > > OpenSSL Project http://www.openssl.org > > User Support Mailing List openssl-users@openssl.org > > Automated List Manager majord...@openssl.org > ______________________________________________________________________ > OpenSSL Project http://www.openssl.org > User Support Mailing List openssl-users@openssl.org > Automated List Manager majord...@openssl.org