This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
RE: RE: RE: On Porting OpenSSL v1.0.0c
- From: "Retallack, Mark" <mark dot retallack at siemens dot com>
- To: "'amassa at san dot rr dot com'" <amassa at san dot rr dot com>
- Cc: "'ecos-discuss at ecos dot sourceware dot org'" <ecos-discuss at ecos dot sourceware dot org>
- Date: Wed, 27 Apr 2011 09:06:44 +0200
- Subject: RE: [ECOS] RE: RE: On Porting OpenSSL v1.0.0c
- References: <20110425212037.JAAQV.41916.root@cdptpa-web03-z02> <03AEFB12CF391F45B74EC59D643A74510787B30FF7@DEFTHW99E24MSX.ww902.siemens.net> <4DB6F860.1080406@san.rr.com>
Hi,
One thing hat comes to mind, error 5 is SSL_ERROR_SYSCALL, see: http://www.openssl.org/docs/ssl/SSL_get_error.html
It also suggests some more debug to use to find out what has happened (for example errno). You can also use something like the following to get a string of the error:
unsigned long l;
while ((l=ERR_get_error()))
{
printf("ssl error: %s\n", ERR_error_string(l,NULL));
}
Because the underlying transport is not TCP, it might be returning an error because of blocking/non-blocking differences. Also I believe that openssl can use ioctl calls, this may be failing on a serial file descriptor.
Mark Retallack
-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org [mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of Anthony Massa
Sent: 26 April 2011 17:53
To: ecos-discuss@ecos.sourceware.org
Subject: [ECOS] RE: RE: On Porting OpenSSL v1.0.0c
Hi,
I have OpenSSL built into my image (along with a slightly older version of eCos). I am not able to use the standard socket interface layer over Ethernet - basically the platform I'm using needs to communicate via serial for the network traffic. So, basically the socket interface functions (connect, send, recv) are implemented to use this serial interface. I have tested the raw socket interface for the connect, send, and recv functions and they appear to be able to echo with a server properly - so I believe the socket interface is running correctly.
I am running the test code I included above (ssltest.c) and find that the test is failing at line 725 when the SSL_connect function is called.
The output I see and errors returned are shown here:
do the SSL connection
SSL_connect status -1
SSL_connect Error 5
I appreciate any feedback.
Thanks,
Anthony
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss