Server response must include a certificate when using TLS #832
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@drice-buf discovered that simply setting
supports_tls: truein the config, and doing nother else to support TLS in a server under test, would not cause any tests to fail (!!!).The issue is that the server was basically ignoring the
use_tlsfield, and thus sending back an absent/empty certificate. The runner would simply forward that certificate to the client. But the client requests don't have a separate flag indicating whether or not to use TLS: they rely on the certificate being present/non-empty to enable it. So this would effectively forward the empty cert to the client, which would simply not use TLS upon seeing that the cert was absent/empty. And all of the tests requests would succeed because neither client nor server were using TLS. (If the client were using TLS but not the server, or vice versa, then every HTTP call would have failed.)The solution is pretty simple: have the runner actually verify that the server provides a certificate when
use_tlsis true.Resolves #830.