Monique,
I'm a little confused by your example; it looks like three distinct code
fragments (or maybe 2.5?) . In the first, your function bio_dump_cb is
called at various times. It is up to bio_dump_cb where the information is
actually written. There is also a callback argument you can set. Its meaning
and function is up to the individual callback function. In the case of the
bio_dump_cb function in apps\s_cb.c, this argument should be set to a BIO *
that you want the trace output to go into. If you don't set it, bio_dump_cb
does nothing. If you set it to a file BIO stdout, then the output goes to
stdout. If you set it to the null sink BIO, you don't get any output.
Since stdout is typically buffered, you may need to flush stdout, perhaps
with BIO_flush(bio_s_out);
good luck
_____________________________________
Greg Stark
Ethentica, Inc.
[EMAIL PROTECTED]
_____________________________________
----- Original Message -----
From: "Monique Mandala" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 25, 2001 2:58 PM
Subject: bio_dump_cb
> I am trying to add tracing to my server application. I'm confused by what
> this function does. It seems to hinge on the variable "cmd". Where is
that
> set and what are the options?
>
> It also seems like the function is working, but I don't see output? Does
it
> write to the BIO structure or the monitor? If the BIO, what api do I use
to
> write to a file or monitor?
>
> What is the difference between the two functions that initialize
> "bio_s_out"?
>
> Here is the relevant section of my code:
> file://Load callback function for error tracing.
> BIO_set_callback(SSL_get_rbio(ssl),bio_dump_cb);
> BIO* bio_s_out = NULL;
> file://bio_s_out=BIO_new_fp(stdout,BIO_NOCLOSE);
> bio_s_out=BIO_new(BIO_s_null());
> BIO_set_callback_arg(SSL_get_rbio(ssl),bio_s_out);
>
> Thanks for any help you can offer!
>
> Monique Mandala
> Proginet Corporation
>
> ______________________________________________________________________
> OpenSSL Project http://www.openssl.org
> User Support Mailing List [EMAIL PROTECTED]
> Automated List Manager [EMAIL PROTECTED]
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]