Skip to content

Commit 824d784

Browse files
authored
rustls: Configure the initial TLS client with trust roots (#1355)
2dd7bb8 changed how rustls configurations are constructed; but it didn't properly configure the default client configuration with the proxy's trust root. This enables the identity client to establish TLS connections with the identity controller during startup.
1 parent bb26cdc commit 824d784

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

linkerd/meshtls/rustls/src/creds.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@ pub fn watch(
3939
let key = EcdsaKeyPair::from_pkcs8(params::SIGNATURE_ALG_RING_SIGNING, key_pkcs8)
4040
.map_err(InvalidKey)?;
4141

42-
let (client_tx, client_rx) = watch::channel(Arc::new(rustls::ClientConfig::new()));
42+
let (client_tx, client_rx) = {
43+
let mut c = rustls::ClientConfig::new();
44+
c.root_store = roots.clone();
45+
c.enable_tickets = false;
46+
watch::channel(Arc::new(c))
47+
};
4348
let (server_tx, server_rx) = watch::channel(Arc::new(rustls::ServerConfig::new(
4449
rustls::AllowAnyAnonymousOrAuthenticatedClient::new(roots.clone()),
4550
)));

0 commit comments

Comments
 (0)