GnuTLS recv error (-9): A TLS packet with unexpected length was received. - with Paypal Website Payment Pro

Nikos Mavrogiannopoulos nmav at gnutls.org
Thu Feb 3 13:21:59 CET 2011


On Thu, Feb 3, 2011 at 1:14 PM, Joe Orton <joe at manyfish.co.uk> wrote:
>> > The problem is that GnuTLS does not distinguish the TCP closure case
>> > from this rather generic "unexpected length" error, as has been
>> > discussed on this list before.  The OpenSSL API does expose this
>> > distinction.
>> How does openssl expose this distinction? Does it have a separate error for
>> unclean termination?
> Via the SSL_get_error() interface, see part on SSL_ERROR_SYSCALL.

Marking it a syscall error doesn't really point the fact of premature
termination.
Would having a special error code on this issue, such as
GNUTLS_E_PREMATURE_TERMINATION
make things better for applications?

regards,
Nikos

PS. To Zachary... A suggestion would be to ignore that error.




More information about the Gnutls-devel mailing list