With GODEBUG=fips140=only, MD5, SHA-1 and HMAC-SHA1 panic, so a request
that uses SigV2 (header, presigned or POST policy), SSE-C (whose customer
key check is MD5) or the SHA-1 flexible checksum panics in the handler and
the client sees a dropped connection. Refuse them before any hashing:
- SigV2: InvalidRequest "The authorization mechanism you have provided is
not supported. Please use AWS4-HMAC-SHA256." (ErrSignatureVersionNotSupported)
- SSE-C, including copy-source SSE-C headers: NotImplemented
- x-amz-checksum-sha1 (value header, algorithm headers or query, and
x-amz-trailer): NotImplemented
fips140Enforced is a package variable so tests can turn the refusals on
without running the test binary under fips140=only. Without enforcement
nothing changes.
Refs #12839
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>