slackhq/nebula · error

ca certificate is expired

Error message

ca certificate is expired

What it means

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.

Source

Thrown at cmd/nebula-cert/sign.go:193

	rawCACert, err := readInput("ca-crt", *sf.caCertPath, &claims)
	if err != nil {
		return fmt.Errorf("error while reading ca-crt: %s", err)
	}

	caCert, _, err := cert.UnmarshalCertificateFromPEM(rawCACert)
	if err != nil {
		return fmt.Errorf("error while parsing ca-crt: %s", err)
	}

	if !isP11 {
		if err := caCert.VerifyPrivateKey(curve, caKey); err != nil {
			return fmt.Errorf("refusing to sign, root certificate does not match private key")
		}
	}

	if caCert.Expired(time.Now()) {
		return fmt.Errorf("ca certificate is expired")
	}

	if version == 0 {
		version = caCert.Version()
	}

	// if no duration is given, expire one second before the root expires
	if *sf.duration <= 0 {
		*sf.duration = time.Until(caCert.NotAfter()) - time.Second*1
	}

	if *sf.networks != "" {
		for _, rs := range strings.Split(*sf.networks, ",") {
			rs := strings.Trim(rs, " ")
			if rs != "" {
				n, err := netip.ParsePrefix(rs)
				if err != nil {
					return newHelpErrorf("invalid -networks definition: %s", rs)

View on GitHub (pinned to dd8f660c0a)

Solutions

  1. Renew: generate a new CA and re-issue certificates
  2. Check system clock correctness on the signing host
  3. Use a CA whose notAfter is in the future
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at cmd/nebula-cert/sign.go:193 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of slackhq/nebula@dd8f660c0a (2026-09-03). Data as JSON: /api/errors/cf45d176ec5501e6. Report an issue: GitHub.