Commit message:
crypto/tls: add BoGo coverage for FIPS 140-3 EMS enforcement
Prior to this commit the enforcement of Extended Master Secret in FIPS
140-3 mode, and the fips140ems GODEBUG that disables it, had no test
coverage. The pre-existing TestBogoSuite is skipped in FIPS mode, and
testing against a peer without EMS support is tricky in other contexts
since crypto/tls cannot be configured to disable the extension.
This commit extracts the runner invocation from TestBogoSuite into
a helper that takes a test filter and extra environment variables, and
add TestBogoSuiteFIPSEMS, which enables FIPS mode in the shim via
GODEBUG. This lets us test a specific subset of BoGo tests with FIPS
enforcement enabled.
We use this to run the EMS tests twice, once with enforcement on,
expecting the non-EMS TLS 1.2 handshake and resumption tests to fail,
and once with fips140ems=0, expecting them to pass.
Updates #80516