Hi,

> I am a newbie to openssl. Maybe my questions here is silly.
> Please be kind to me.

> I recently downloaded the openssl source, and compiled it
> under win32 successfully.

> When I use VC6 to try to write a tiny test case,
> I just couldn't get through it.

>My code is list below:

>#include <stdio.h>
>#include "openssl/bio.h"

>int main ()
>{
>    BIO *bio_out;
>    bio_out = BIO_new_fp(stdout, BIO_NOCLOSE);
>    BIO_printf(bio_out, "Hello World\n");
>
>    getchar();
>
>    return(0);
>}

>The code was compiled successfully.

>When the code went to "BIO_printf(bio_out, "Hello World\n");", it stoped
>and exited without any error information.

>Could you tell me why? Does my program need further configurations?

        I'll try to be kind. The problem is that you never asked it to do 
anything.
You created a BIO attached to 'stdout', you put some bytes in the BIO (which
is a buffer), then you waited for a character, and then you terminated your
program (destroying the BIO without giving it any chance to write to
stdout).

        DS


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to