------=_NextPart_000_000F_01C25210.8A283380
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I need to use a variable SSL* ssl as a field in a structure, but when I =
use it (i.e. SSL_accept(structure.ssl)) the program gives a segmentation =
fault!
I tried to write the program with the ssl variable outside of the =
structure, and all runs perfectly! But in this last case I can use only =
a ssl connection at a time!
Instead, I need to treat many ssl connections at a time from different =
clients (for this I need ssl variable in a structure), and generally =
data read from a connection are generally sent out to another different =
one (I use select to check sockets for read/write and non blocking =
sockets)
Have you some idea about this problem?
Thanks
Fabio Mercuri
------=_NextPart_000_000F_01C25210.8A283380
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2716.2200" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I need to use a variable SSL* ssl as a =
field in a=20
structure, but when I use it (i.e. SSL_accept(structure.ssl)) the =
program gives=20
a segmentation fault!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I tried to write the program with the =
ssl variable=20
outside of the structure, and all runs perfectly! But in this last case =
I can=20
use only a ssl connection at a time!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Instead, I need to treat many ssl =
connections at a=20
time from different clients (for this I need ssl variable in a =
structure), and=20
generally data read from a connection are generally sent out to another=20
different one (I use select to check sockets for read/write and non =
blocking=20
sockets)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Have you some idea about this =
problem?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Fabio =
Mercuri</FONT></DIV></BODY></HTML>
------=_NextPart_000_000F_01C25210.8A283380--
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openss...@openssl.org
Automated List Manager majo...@openssl.org
typedef struct conndef {
SSL *ssl;
char client_info[256];
...
} MYCONNECTION;
MYCONNECTION myconn;
SSL_CTX blurb
SSL_accept(myconn.ssl);
it should work.
However, if you are using multiple clients, I'd imagine you are using an
array (static or dynamic).
If static, ie
MYCONNECTION myconns[256];
then
SSL_accept(myconns[i].ssl);
should again work.
However, the only thing I can think of is that you are using
MYCONNECTION *myconns;
and either forgetting to malloc the memory or not mallocing enough.
John.
-----Original Message-----
From: owner-ope...@openssl.org
[mailto:owner-ope...@openssl.org]On Behalf Of Fabio Mercuri
Sent: 01 September 2002 22:38
To: openss...@openssl.org
Subject: ssl help
I need to use a variable SSL* ssl as a field in a structure, but when I use
it (i.e. SSL_accept(structure.ssl)) the program gives a segmentation fault!
I tried to write the program with the ssl variable outside of the structure,
and all runs perfectly! But in this last case I can use only a ssl
connection at a time!
Instead, I need to treat many ssl connections at a time from different
clients (for this I need ssl variable in a structure), and generally data
read from a connection are generally sent out to another different one (I
use select to check sockets for read/write and non blocking sockets)
Have you some idea about this problem?
Thanks
Fabio Mercuri
______________________________________________________________________