Hello:

I tried your advice but I obtain the same result. I have tried the
following:

ERR_load_crypto_strings();

printf ("error: %i\n",ERR_get_error());
printf(ERR_error_string(ERR_get_error(), NULL));
printf(ERR_lib_error_string(ERR_get_error()));
printf(ERR_func_error_string(ERR_get_error()));
printf(ERR_reason_error_string(ERR_get_error()));
fflush(stdout);

This code only show:

error: 0
error:00000000:lib(0):func(0):reason(0)

But it not show a human-readable string representing the error code. Why?. I
have load the OpenSSL error strings by calling:
        ERR_load_crypto_strings();

Why it not show the string representing the error code?.

Thanks for you help.



----- Original Message ----- 
From: "Andreas Hoffmann" <[EMAIL PROTECTED]>
To: <openssl-users@openssl.org>
Sent: Wednesday, May 11, 2005 8:13 PM
Subject: Re: No show errors with ERR_print_errors_fp()


> Hi
>
> >I want to obtain the errors that I have, and I use the function
> >ERR_print_errors_fp().
> >But , this give a empty file. And I have errors ...
> >
> >My code:
> >
> >ERR_load_crypto_strings();
> >
> >fp = fopen(fileError, "w");
> >ERR_print_errors_fp(fp);
> >fclose(fp);
> >
> >
> >
> >
> Have you tried to direct the errors to "stderr"? using:
> ERR_print_errors_fp (stderr);
>
> Do you do multiple "fopen ... fclose" in your code?
> Then you should use
> fp = fopen(fileError,"a");
> as the "w" option overwrites the file contents.
> So may be your last write contained no errors.
>
> I hope this helps.
>
> Andreas
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    openssl-users@openssl.org
> Automated List Manager                           [EMAIL PROTECTED]

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

Reply via email to