Use larger buffer for TLS encryption to avoid issues with GnuTLS
authorJouni Malinen <j@w1.fi>
Mon, 9 Feb 2009 20:37:55 +0000 (22:37 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 9 Feb 2009 20:37:55 +0000 (22:37 +0200)
commitedd757e8a3d165cbfc4d1721f30a8aa276f9329b
tree38b1a43c7ef529a3b336da2150e6e1a006531f9f
parent363a9e2434c00e06b76d1ec1add434a4a8fd970f
Use larger buffer for TLS encryption to avoid issues with GnuTLS

It looks like GnuTLS (at least newer versions) is using random padding
on the application data and the previously used 100 byte extra buffer
for tls_connection_encrypt() calls was not enough to handle all cases.
This resulted in semi-random authentication failures with EAP-PEAP and
EAP-TTLS during Phase 2.

Increase the extra space for encryption from 100 to 300 bytes and add an
error message into tls_gnutls.c to make it easier to notice this issue
should it ever show up again even with the larger buffer.
src/crypto/tls_gnutls.c
src/eap_peer/eap_tls_common.c