Added a workaround for handling TLS compression
authorJouni Malinen <j@w1.fi>
Mon, 26 May 2008 09:33:04 +0000 (12:33 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 26 May 2008 09:33:04 +0000 (12:33 +0300)
commitef626b4d5053ea56817a39170c41686c014d6e37
tree53b7af9b8e70b544b654e3ba1702a0fc2607bc86
parente572cb639866063956202b0eefa18615e257cf76
Added a workaround for handling TLS compression

Even though we try to disable TLS compression, it is possible that this
cannot be done with all TLS libraries. For example, OpenSSL 0.9.8 does not
seem to have a configuration item for disabling all compression (0.9.9 has
such an option). If compression is used, Phase 2 decryption may end up
producing more data than the input buffer due to compressed data. This
shows up especially with EAP-TNC that uses very compressible data format.

As a workaround, increase the decryption buffer length to (orig_len+500)*3.
This is a hack, but at least it handles most cases. TLS compression should
really be disabled for EAP use of TLS, but since this can show up with
common setups, it is better to handle this case.
src/eap_peer/eap_tls_common.c
src/eap_server/eap_fast.c
src/eap_server/eap_peap.c
src/eap_server/eap_ttls.c