[client] Compare the client certificate paths before reporting a change

apply() assigned the incoming mTLS certificate and key paths and set updated
unconditionally, without comparing them to what the config already held. It is
the same presence-instead-of-value mistake this branch set out to fix, one
layer down: a caller restating its own certificate paths was reported as
changing them, which trips the value-aware update-settings gate.

Reported by cubic-dev-ai on PR #7398.
This commit is contained in:
riccardom
2026-09-02 15:31:06 +02:00
parent 911705e1c6
commit c660fcaaac
2 changed files with 32 additions and 2 deletions
+5 -2
View File
@@ -708,12 +708,15 @@ func (config *Config) apply(input ConfigInput) (updated bool, err error) {
updated = true
}
if input.ClientCertKeyPath != "" {
// Compared, not just assigned: restating the path a config already holds
// changes nothing, and reporting it as an update makes a caller that
// re-sends its own configuration look like one asking to change it.
if input.ClientCertKeyPath != "" && input.ClientCertKeyPath != config.ClientCertKeyPath {
config.ClientCertKeyPath = input.ClientCertKeyPath
updated = true
}
if input.ClientCertPath != "" {
if input.ClientCertPath != "" && input.ClientCertPath != config.ClientCertPath {
config.ClientCertPath = input.ClientCertPath
updated = true
}