(Sorry about the HTML, Outlook can't convert for some reason.)

  _____  

From: owner-openssl-us...@openssl.org
[mailto:owner-openssl-us...@openssl.org] On Behalf Of ???
Sent: Friday, 19 October, 2012 02:44
To: openssl-users@openssl.org
Subject: problem with cross compile OpenSSL


Hi,
   I am glad to talk with you.Now I have a problem when I using OpenSSL.
   I want to use openssl on my ARM platform,so I need to cross compile it.I
download the openssl-1.0.1c from the openssl.org.I used arm-linux-gcc(libc2.
2.5) to comlile it successfully,getting libssl.a ,libcrypto.a  and
openssl.But when I run openssl on my ARM with the command "./openssl
s_client -connect smtp.gmail.com:465 -state",it got error.the messages is
"CONNECTED(00000003)
SSL_connect:before/connect initialization
SSL_connect:error in SSLv2/v3 write client hello A
write:errno=0
--- " 
 

error on *write*, and with errno=0? That's very weird. Write on a TCP socket

immediately after connecting should never fail.

Leave openssl out of the picture for a moment. If you (cross)compile a 
program which just does a plain TCP socket connection, does it work?
(Since you want access to gmail, you might try connecting to www.google.com
80, 
sending the simplest possible HTTP request:
  GET / HTTP/1.0\r\n\r\n
and seeing if you get any reply data (probably doesn't matter what, although

it should be an HTML page), or some socket/OS error.
 

the similar problems ,I made a test program with libssl.a ,libcrypto.a which
I cross compiled . SSL_connect function return -1,I use SSL_get_error ,i got
the errno 5(SSL_ERROR_SYSCALL),and ERR_get_error to check,it return 0,I find
the documents which says " If ret == 0, an EOF was observed that violates
the protocol." I don't know what's the meaning and how to solve it. 
 

Note 'ret == 0' in SSL_get_error manpage means the return from SSL_connect
(passed to SSL_get_error)
not the return from ERR_get_error. You say SSL_connect returned -1, so read
the next sentence 
to cover that case, and as it says on Unix look at errno.
 
 

Reply via email to