TLS testing: Allow hostapd to be used as a TLS testing tool
authorJouni Malinen <j@w1.fi>
Sat, 1 Mar 2014 22:43:59 +0000 (00:43 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 9 Mar 2014 16:47:09 +0000 (18:47 +0200)
commit390b92913a9a1b3a6aaf70e8b5971a7b7c76cabc
treef1133b51bd4457347248a0e126fa43dcbbe18d1d
parent994afe3390695400ea63df5533c1dd9d8c2ccbd4
TLS testing: Allow hostapd to be used as a TLS testing tool

The internal TLS server implementation and RADIUS server implementation
in hostapd can be configured to allow EAP clients to be tested to
perform TLS validation steps correctly. This functionality is not
included in the default build; CONFIG_TESTING_OPTIONS=y in
hostapd/.config can be used to enable this.

When enabled, the RADIUS server will configure special TLS test modes
based on the received User-Name attribute value in this format:
<user>@test-tls-<id>.<rest-of-realm>. For example,
anonymous@test-tls-1.example.com. When this special format is used, TLS
test modes are enabled. For other cases, the RADIUS server works
normally.

The following TLS test cases are enabled in this commit:
1 - break verify_data in the server Finished message
2 - break signed_params hash in ServerKeyExchange
3 - break Signature in ServerKeyExchange

Correctly behaving TLS client must abort connection if any of these
failures is detected and as such, shall not transmit continue the
session.

Signed-off-by: Jouni Malinen <j@w1.fi>
12 files changed:
src/crypto/tls.h
src/crypto/tls_internal.c
src/eap_server/eap.h
src/eap_server/eap_i.h
src/eap_server/eap_server.c
src/eap_server/eap_server_tls_common.c
src/radius/radius_server.c
src/tls/tlsv1_server.c
src/tls/tlsv1_server.h
src/tls/tlsv1_server_i.h
src/tls/tlsv1_server_read.c
src/tls/tlsv1_server_write.c