Hi,

I am sorry if I misunderstood things. I went through the text quoted by him.
Also, I did google search for that and what I understood was:
ERR_load_crypto_strings() registers the error strings for all libcrypto
functions. SSL_load_error_strings() does the same, but also registers the
libssl error strings. One of these functions should be called before
generating textual error messages. However, this is not required when memory
usage is an issue. ERR_free_strings() frees all previously loaded error
strings.

So, I thought by calling SSL_load_error_strings() will register the SSL
error strings automatically and once that is done, then probably SSL error
string will get dumped in file. 

This is what I understood and also I am not much familiar with SSl API's.
So, here it might be possible that I mis-interpreted things.

Thanks
Akanksha Shukla.

-----Original Message-----
From: owner-openssl-us...@openssl.org
[mailto:owner-openssl-us...@openssl.org] On Behalf Of Jeremy Farrell
Sent: Tuesday, November 01, 2011 1:39 AM
To: openssl-users@openssl.org; carlyo...@keycomm.co.uk
Subject: RE: RE: Open SSL API's Support For IPv6.

> From: Akanksha Shukla [mailto:akshu...@cisco.com]
> 
> Hi Carl,
> 
> I added the API's call as mentioned by you in the else part to get the
> dump
> of the error. But this time also, I am not successful.
>           else
>           {
>              SSL_load_error_strings();
>              SSL_library_init();
>              FILE * pFile1;
>              pFile1 = fopen ("result.txt","a");
>              if (pFile1!=NULL)
>              {
>                 ERR_print_errors_fp(pFile1);
>                 fclose(pFile1);
>              }
>              cout << " The Bio_do_connect failed" << endl;
>              break;
>           }
> 
> This time also, I got blank file without having any output in it. Am is
> missing something here or using them in incorrect way?
> 
> Please suggest.
> 
> Thanks
> Akanksha Shukla.
> 
> -----Original Message-----
> From: carlyo...@keycomm.co.uk [mailto:carlyo...@keycomm.co.uk]
> 
> > On Mon 31/10/11 4:25 PM , "Akanksha Shukla" akshu...@cisco.com sent:
> > Hi Michael,
> >
> > Thanks for the reply. But I think the issue is not from the C
> perspective.
> > As I already mentioned, that if I use fputs to directly write a
> string to
> > file, then I am able to do that successfully. But when I try to write
> the
> > error code thrown by Bio_do_connect() API, then nothing is getting
> written
> > in file and for that I have used the API suggested by Stephen in the
> forum
> > (ERR_print_errors_fp(pFile)).
> 
> Are you loading the strings?
> 
> From:http://www.openssl.org/docs/ssl/SSL_library_init.htmlEXAMPLES
> 
>     A typical TLS/SSL application will start with the library
> initialization, and provide readable error messages.
>         SSL_load_error_strings();                /* readable error
> messages
> */
>         SSL_library_init();                      /* initialize library
> */
> 
> Carl

Did you read the page he referred you to? Did you read the text he quoted?
Did you think about what it said at all?
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to