tls_generic_test sanitisation.

Why not use this everywhere?