Skip to content

Incorrect error when validating Certificate PrivateKey #6474

@SgtCoDFish

Description

@SgtCoDFish

Describe the bug:

The validating webhook has an incorrect error message if the key type is not valid. It doesn't mention Ed25519.

el = append(el, field.Invalid(fldPath.Child("privateKey", "algorithm"), crt.PrivateKey.Algorithm, "must be either empty or one of rsa or ecdsa"))

There should also be tests for ed25519 in the corresponding test file: https://github.com/cert-manager/cert-manager/blob/d2f6bbe579fd9d5f88b82f9a4bfe9241709e9eb8/internal/apis/certmanager/validation/certificate_test.go

/kind bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions