help-gnutls
[Top][All Lists]
Advanced

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

Re: [Help-gnutls] UNEXPECTED_PACKET_LENGTH errors


From: Nikos Mavroyanopoulos
Subject: Re: [Help-gnutls] UNEXPECTED_PACKET_LENGTH errors
Date: Tue Sep 3 04:14:02 2002
User-agent: Mutt/1.4i

On Tue, Sep 03, 2002 at 04:52:28AM +0300, Timo Sirainen wrote:

> I'm wondering a bit how I should deal with UNEXPECTED_PACKET_LENGTH errors
> coming from gnutls_record_recv() each time connection is unexpectedly
> terminated (eg. hitting ^C in gnutls-cli).
> Shouldn't gnutls_record_recv() instead just return 0 to indicate that the
> connection was closed? Or is this expected behaviour and I should simply
> ignore all packet length errors?

The TLS layer cannot be closed by the transport layer. Ie you cannot
call close() in a TLS connection before you call gnutls_bye(). This
is to avoid certain kind of attacks. However some browsers and other stuff
tend not to comply with this. RFC2818 (HTTPS), also states this, and
says that you should ignore this kind of errors.

It's up to you, whether you'll be pedantic or not. Gnutls just cannot 
ignore this error.

-- 
Nikos Mavroyanopoulos
mailto:address@hidden




reply via email to

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