Setup
The client trusts one freshly generated local certificate authority. A local HTTPS endpoint presents a certificate from that authority. A second local endpoint presents a certificate from a different authority. Both servers run only inside the test process.
Observed result
The first endpoint completes a TLS request. The client rejects the second endpoint because its certificate chain does not match the configured trust root. The runnable case is TestAdversarialFakeTLSEndpoint in the Go SDK pilot tests.
This exercises certificate validation against a synthetic local endpoint using the client’s configured trust. A corporate inspection proxy or compromised device trust store can be trusted intentionally, which is a separate case covered by the trusted interception example.
The tests use synthetic local certificates and requests.
SDK example: Run the tls-untrusted-certificate case in the SDK source tree.