slackhq/nebula · error
error while parsing ca-crt: %s
Error message
error while parsing ca-crt: %s
What it means
Wrapping error in signCert: cert.UnmarshalCertificateFromPEM could not parse the CA certificate bytes from the ca-crt input. The file was read but is not a valid Nebula certificate (wrong PEM banner, corruption, or unrecognized version); cause included via %s.
Source
Thrown at cmd/nebula-cert/sign.go:183
}
}
curve, caKey, _, err = cert.DecryptAndUnmarshalSigningPrivateKey(passphrase, rawCAKey)
if err != nil {
return fmt.Errorf("error while parsing encrypted ca-key: %s", err)
}
} else if err != nil {
return fmt.Errorf("error while parsing ca-key: %s", err)
}
}
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 {View on GitHub (pinned to dd8f660c0a)
Solutions
- Confirm the ca-crt file is a certificate produced by nebula-cert ca
- Re-export or regenerate the CA certificate
- Check for truncation or copy/paste corruption of the PEM
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at cmd/nebula-cert/sign.go:183 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of slackhq/nebula@dd8f660c0a (2026-09-03).
Data as JSON: /api/errors/298cddd79b12e436.
Report an issue: GitHub.