{"record":{"id":"cf45d176ec5501e6","repo":"slackhq/nebula","slug":"ca-certificate-is-expired","errorCode":null,"errorMessage":"ca certificate is expired","messagePattern":"ca certificate is expired","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/nebula-cert/sign.go","lineNumber":193,"sourceCode":"\n\trawCACert, err := readInput(\"ca-crt\", *sf.caCertPath, &claims)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error while reading ca-crt: %s\", err)\n\t}\n\n\tcaCert, _, err := cert.UnmarshalCertificateFromPEM(rawCACert)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error while parsing ca-crt: %s\", err)\n\t}\n\n\tif !isP11 {\n\t\tif err := caCert.VerifyPrivateKey(curve, caKey); err != nil {\n\t\t\treturn fmt.Errorf(\"refusing to sign, root certificate does not match private key\")\n\t\t}\n\t}\n\n\tif caCert.Expired(time.Now()) {\n\t\treturn fmt.Errorf(\"ca certificate is expired\")\n\t}\n\n\tif version == 0 {\n\t\tversion = caCert.Version()\n\t}\n\n\t// if no duration is given, expire one second before the root expires\n\tif *sf.duration <= 0 {\n\t\t*sf.duration = time.Until(caCert.NotAfter()) - time.Second*1\n\t}\n\n\tif *sf.networks != \"\" {\n\t\tfor _, rs := range strings.Split(*sf.networks, \",\") {\n\t\t\trs := strings.Trim(rs, \" \")\n\t\t\tif rs != \"\" {\n\t\t\t\tn, err := netip.ParsePrefix(rs)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn newHelpErrorf(\"invalid -networks definition: %s\", rs)","sourceCodeStart":175,"sourceCodeEnd":211,"githubUrl":"https://github.com/slackhq/nebula/blob/dd8f660c0ac37903ec4080ca4d3c861ba9342ceb/cmd/nebula-cert/sign.go#L175-L211","documentation":"Fatal refusal in signCert: caCert.Expired(time.Now()) is true — the CA certificate's validity window has passed, so any certificate signed now would be untrusted for its entire life. Signing aborts before any key use.","triggerScenarios":"Thrown at cmd/nebula-cert/sign.go:193 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Renew: generate a new CA and re-issue certificates","Check system clock correctness on the signing host","Use a CA whose notAfter is in the future"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"dd8f660c0ac37903ec4080ca4d3c861ba9342ceb","analyzedAt":"2026-09-03T11:13:55.444Z","contentChangedAt":"2026-09-03T11:13:55.444Z","schemaVersion":2},"datasetVersion":"2026-09-10T17:17:09.494Z"}