{"record":{"id":"4da3c8fd6e578d6d","repo":"hyperledger/fabric","slug":"failed-to-set-client-root-certificate-s","errorCode":null,"errorMessage":"failed to set client root certificate(s)","messagePattern":"failed to set client root certificate\\(s\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/pkg/comm/server.go","lineNumber":289,"sourceCode":"\t\t\treturn nil, err\n\t\t}\n\n\t\tcerts = append(certs, cert)\n\t}\n\n\treturn certs, nil\n}\n\n// SetClientRootCAs sets the list of authorities used to verify client\n// certificates based on a list of PEM-encoded X509 certificate authorities\nfunc (gServer *GRPCServer) SetClientRootCAs(clientRoots [][]byte) error {\n\tgServer.lock.Lock()\n\tdefer gServer.lock.Unlock()\n\n\tcertPool := x509.NewCertPool()\n\tfor _, clientRoot := range clientRoots {\n\t\tif !certPool.AppendCertsFromPEM(clientRoot) {\n\t\t\treturn errors.New(\"failed to set client root certificate(s)\")\n\t\t}\n\t}\n\tgServer.tls.SetClientCAs(certPool)\n\treturn nil\n}\n","sourceCodeStart":271,"sourceCodeEnd":295,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/pkg/comm/server.go#L271-L295","documentation":"SetClientRootCAs guard: one of the supplied PEM-encoded client root CAs could not be appended to the new cert pool (AppendCertsFromPEM returned false), so the trust-store refresh (updateTrustedRoots) is aborted without replacing the existing pool.","triggerScenarios":"Thrown at internal/pkg/comm/server.go:289 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Validate each entry of the client root CA list is PEM X.509","Fix or drop the offending CA material and retry the config update","Check configuration source (e.g., config update transaction) for corrupt CA bytes"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2736b63f8fd5932511d56fe68b7039d15977f7f6","analyzedAt":"2026-09-04T08:52:36.465Z","contentChangedAt":"2026-09-04T08:52:36.465Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}