[Help-gnutls] Strange error when using libgnutls

Nikos Mavroyanopoulos nmav at gnutls.org
Tue May 18 09:50:33 CEST 2004

On Tuesday 18 May 2004 00:43, Pedro Corte-Real wrote:

> When using a slightly modified version of the example code at:
> http://www.gnu.org/software/gnutls/documentation/gnutls/gnutls.html#SECTION
> The only modification I've done is to run gnutls_record_recv in a loop
> to fetch everything until it gets an error or EOF.
> The file is attatched.
> I get this error:
> "A TLS packet with unexpected length was received."
> This happens when receiving the last block of information when
> gnutls_record_recv returns an error (-9) instead of 0 for EOF.
This is because the other end does not properly terminate the
TLS session. Several https servers do that.

> Greetings,
> Pedro Côrte-Real.

Nikos Mavroyanopoulos

More information about the Gnutls-help mailing list