slackhq/nebula · error
error while parsing encrypted ca-key: %s
Error message
error while parsing encrypted ca-key: %s
What it means
Wrapping error in signCert: cert.DecryptAndUnmarshalSigningPrivateKey failed on the encrypted CA key bytes — the passphrase was obtained but is wrong, or the key blob is malformed. The underlying error is appended with %s.
Source
Thrown at cmd/nebula-cert/sign.go:169
passphrase, err = pr.ReadPassword()
if errors.Is(err, ErrNoTerminal) {
return fmt.Errorf("ca-key is encrypted and must be decrypted interactively")
} else if err != nil {
return fmt.Errorf("error reading password: %s", err)
}
if len(passphrase) > 0 {
break
}
}
if len(passphrase) == 0 {
return fmt.Errorf("cannot open encrypted ca-key without passphrase")
}
}
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 {View on GitHub (pinned to dd8f660c0a)
Solutions
- Retry with the correct passphrase
- Verify the ca-key file is a valid encrypted signing key produced by nebula-cert ca
- Regenerate the CA key pair if the file is corrupted
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at cmd/nebula-cert/sign.go:169 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/9ff990b0738ccf13.
Report an issue: GitHub.