mirror of https://github.com/grpc/grpc.git
[xDS] fix "tls" channel cred in bootstrap to actually work (#36726)
This fixes a fairly embarrassing bug and lack of testing from #33234. Prior to this fix, attempting to use the "tls" creds type would always cause a crash. @gtcooke94 @matthewstevenson88 Note that the root cause of this bug was that when I wrote this code, I assumed that `grpc_tls_credentials_options` had a reasonable default for the cert verifier. But it turns out that it doesn't do that directly; instead, we are only imposing that default in [`CredentialOptionSanityCheck()`](pull/36752/head621aa4e5ce/src/core/lib/security/credentials/tls/tls_credentials.cc (L85)
), which is called only when we call [`grpc_tls_credentials_create()`](621aa4e5ce/src/core/lib/security/credentials/tls/tls_credentials.cc (L160)
), not when we directly instantiate `TlsCredentials` as my code was doing. As part of the TlsCreds API cleanup you're working on, we should fix this so that callers get the right behavior even if they are internal callers that instantiate the TlsCreds object directly rather than calling the C-core API. Closes #36726 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36726 from markdroth:xds_bootstrap_mtls_creds_fixdac2789e10
PiperOrigin-RevId: 637993734
parent
1309eb283c
commit
2395bb1b86
8 changed files with 90 additions and 5 deletions
Loading…
Reference in new issue