Skip to content

Invalid key_usage warning for valid key usages #31597

@dselyuzhitskiy

Description

@dselyuzhitskiy

Describe the bug
When generating root (and maybe other certs) with -format=json and key_usage like "crlsing,certsign", there is invalid key usage warning in response

"Invalid key usage will be ignored: ",

Thaths because empty slice is not nil in validateCaKeyUsages func

Expected behavior
No warnings for valid key usages

Environment:

  • Vault Server Version (retrieve with vault status): 1.20.4
  • Vault CLI Version (retrieve with vault version): 1.20.4
  • Server Operating System/Architecture: macos/arm64

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUsed to indicate a potential bugsecret/pki

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions