crash when calling ERR_print_errors_fp()

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

crash when calling ERR_print_errors_fp()

Mithun Kumar
Hello All,

When i give file pointer as input to API(ERR_print_errors_fp()) nothing is getting written to the FILE during a SSL handshake failure. Any inputs why things are failing.

-mithun


Reply | Threaded
Open this post in threaded view
|

RE: crash when calling ERR_print_errors_fp()

Dave Thompson-5
>From: [hidden email] On Behalf Of Mithun Kumar
>Sent: Thursday, 06 September, 2012 16:29

>When i give file pointer as input to API(ERR_print_errors_fp())
>nothing is getting written to the FILE during a SSL handshake
>failure. Any inputs why things are failing.
       
If you are on Windows and app doesn't have OpenSSL_applink,
OpenSSL won't (can't) write to the file, but it should give
a message on stderr and should not crash.

http://www.openssl.org/support/faq.html#PROG2 at the end.

On all systems make sure the fp is open (for write) before,
and is flushed or closed after.


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

RE: crash when calling ERR_print_errors_fp()

Charles Mills
Try ERR_print_errors_fp(stderr) -- eliminates issues with your file. If that
works, then it's your file pointer.

Note Dave's point about flushing the file.

Charles

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Dave Thompson
Sent: Thursday, September 06, 2012 4:46 PM
To: [hidden email]
Subject: RE: crash when calling ERR_print_errors_fp()

>From: [hidden email] On Behalf Of Mithun Kumar
>Sent: Thursday, 06 September, 2012 16:29

>When i give file pointer as input to API(ERR_print_errors_fp()) nothing
>is getting written to the FILE during a SSL handshake failure. Any
>inputs why things are failing.
       
If you are on Windows and app doesn't have OpenSSL_applink, OpenSSL won't
(can't) write to the file, but it should give a message on stderr and should
not crash.

http://www.openssl.org/support/faq.html#PROG2 at the end.

On all systems make sure the fp is open (for write) before, and is flushed
or closed after.


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

RE: crash when calling ERR_print_errors_fp()

J. J. Farrell-2
In reply to this post by Mithun Kumar

Your message suggests to me that you are calling the API and expecting it to cause subsequent errors to be written to the FILE. It doesn't work like that; the messages won't be written to the file during the handshake. The API writes out any messages which are queued up in the internal message buffers. You need to call the API after the handshake failure to dump out the errors which have been buffered internally.

 

Regards,

                      jjf

 

From: Mithun Kumar [mailto:[hidden email]]
Sent: Thursday, September 06, 2012 9:29 PM
To: [hidden email]; [hidden email]
Subject: crash when calling ERR_print_errors_fp()

 

Hello All,

When i give file pointer as input to API(ERR_print_errors_fp()) nothing is getting written to the FILE during a SSL handshake failure. Any inputs why things are failing.

-mithun

Reply | Threaded
Open this post in threaded view
|

Re: crash when calling ERR_print_errors_fp()

Mithun Kumar
Thanks All,

I am currently on Linux and trying to write to a file after the handshake has failed. But i dont see anything written to a file. using stderr instead of file pointer be of some help?

-mithun


On Fri, Sep 7, 2012 at 5:58 AM, Jeremy Farrell <[hidden email]> wrote:

Your message suggests to me that you are calling the API and expecting it to cause subsequent errors to be written to the FILE. It doesn't work like that; the messages won't be written to the file during the handshake. The API writes out any messages which are queued up in the internal message buffers. You need to call the API after the handshake failure to dump out the errors which have been buffered internally.

 

Regards,

                      jjf

 

From: Mithun Kumar [mailto:[hidden email]]
Sent: Thursday, September 06, 2012 9:29 PM
To: [hidden email]; [hidden email]
Subject: crash when calling ERR_print_errors_fp()

 

Hello All,

When i give file pointer as input to API(ERR_print_errors_fp()) nothing is getting written to the FILE during a SSL handshake failure. Any inputs why things are failing.

-mithun