help-gnutls
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnutls_bye() error handling in a sane way


From: Jos Kuijpers
Subject: gnutls_bye() error handling in a sane way
Date: Fri, 7 Jan 2011 22:34:50 +0100

Folks,

Since a week, I am having serious problems with the GnuTLS library
concerning the gnutls_bye():

I am writing a binding between gnutls and ObjFW
(https://www.webkeks.org/objfw) => https://webkeks.org/hg/objgnutls/
When an attempt to reading from the socket failed, and results in a closed
socket (because of a malicious client, or lost network connection, etc),
the close method of the object gets called. This method then will call
gnutls_bye, socket close and gnutls_deinit.

There is the problem. Gnutls_bye sends data. When the socket is broken, and
gnutls_bye is called, my program DIES: SIGPIPE.
I am very disappointed about this. Catching signals in a library is
not-done.

Is there a way to get proper error handling done in this case?
Else, I will send this mail to the development mailing list for adding
support for sane error handling.


With kind regards,

Jos





reply via email to

[Prev in Thread] Current Thread [Next in Thread]