On Thu, Jan 25, 2001 at 09:19:48AM -0800, Patrick Li wrote:
> Hi,
> 
> I am reading the SSL_read() in ssl_lib.c file under ssl directory and it
> calls the ssl_read(SSL *, void *, int) function. I searched the ssl
> directory and found there is a ssl_read(BIO *, char *, int) defined in
> bio_ssl.c.  Looks like it is casting the SSL structure to the BIO structure.
> But I check the SSL structure and BIO structure are quite different and
> I couldn't figure it why?  Did I miss something here?  Anyone can help me?

You have been fooled: in ssl_lib.c, SSL_read() calls a read function via
a function pointer:
  return(s->method->ssl_read(s,buf,num));
The function for reading is defined for each method:
For an SSLv3 method, this is the function "ssl3_read()" in s3_lib.c,
which is set up in the table on top of s3_lib.c and is defined within
s3_lib.c. The according functions the othe methods are in s23_lib.c
and so on.

Best regards,
        Lutz
-- 
Lutz Jaenicke                             [EMAIL PROTECTED]
BTU Cottbus               http://www.aet.TU-Cottbus.DE/personen/jaenicke/
Lehrstuhl Allgemeine Elektrotechnik                  Tel. +49 355 69-4129
Universitaetsplatz 3-4, D-03044 Cottbus              Fax. +49 355 69-4153
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to