{"record":{"id":"d5e33826b3e47a2e","repo":"temporalio/temporal","slug":"cannot-specify-rootcafiles-and-rootcadata-at-the-s","errorCode":null,"errorMessage":"cannot specify RootCAFiles and RootCAData at the same time","messagePattern":"cannot specify RootCAFiles and RootCAData at the same time","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"common/rpc/encryption/tls_factory.go","lineNumber":144,"sourceCode":"\t}\n\tif err := validateCAs(cfg.ClientCAFiles); err != nil {\n\t\treturn fmt.Errorf(\"invalid ServerTLS.ClientCAFiles: %w\", err)\n\t}\n\tif len(cfg.ClientCAFiles) > 0 && len(cfg.ClientCAData) > 0 {\n\t\treturn fmt.Errorf(\"cannot specify ClientCAFiles and ClientCAData at the same time\")\n\t}\n\treturn nil\n}\n\nfunc validateClientTLS(cfg *config.ClientTLS) error {\n\tif err := validateCAs(cfg.RootCAData); err != nil {\n\t\treturn fmt.Errorf(\"invalid ClientTLS.RootCAData: %w\", err)\n\t}\n\tif err := validateCAs(cfg.RootCAFiles); err != nil {\n\t\treturn fmt.Errorf(\"invalid ClientTLS.RootCAFiles: %w\", err)\n\t}\n\tif len(cfg.RootCAData) > 0 && len(cfg.RootCAFiles) > 0 {\n\t\treturn fmt.Errorf(\"cannot specify RootCAFiles and RootCAData at the same time\")\n\t}\n\treturn nil\n}\n\nfunc validateCAs(cas []string) error {\n\tfor _, ca := range cas {\n\t\tif strings.TrimSpace(ca) == \"\" {\n\t\t\treturn fmt.Errorf(\"CA cannot be empty string\")\n\t\t}\n\t}\n\treturn nil\n}\n","sourceCodeStart":126,"sourceCodeEnd":157,"githubUrl":"https://github.com/temporalio/temporal/blob/bde624efd13fbd3843654058db6d9c716166318b/common/rpc/encryption/tls_factory.go#L126-L157","documentation":"Error \"cannot specify RootCAFiles and RootCAData at the same time\" thrown in temporalio/temporal.","triggerScenarios":"Thrown at common/rpc/encryption/tls_factory.go:144 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bde624efd13fbd3843654058db6d9c716166318b","analyzedAt":"2026-09-01T07:18:39.080Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}