Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new generate-keys command to opencertserver.cli and introduces BDD coverage to validate keypair generation outputs/paths.
Changes:
- Adds
generate-keysCLI command (RSA/ECDSA) with output-path resolution and PEM file writing. - Adds new Reqnroll feature + step assertions to validate generated key files exist and match.
- Adjusts certificate loading/validation in existing CLI commands (EST enroll, sign-csr).
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/opencertserver.cli.tests/StepDefinitions/OpenCertServerCliStepDefinitions.cs | Adds placeholder handling for key output paths, serializes CLI execution, and adds keypair match assertions. |
| tests/opencertserver.cli.tests/Features/GenerateKeys.feature | New BDD scenarios for RSA/ECDSA key generation and shared --out prefix behavior. |
| tests/opencertserver.cli.tests/Features/GenerateKeys.feature.cs | Auto-generated Reqnroll binding for the new feature. |
| src/opencertserver.cli/Program_GenerateKeys.cs | Implements generate-keys command and supporting helpers (path derivation, key generation, file output). |
| src/opencertserver.cli/Program.cs | Registers the new command with the root command. |
| src/opencertserver.cli/Program_EstEnroll.cs | Changes client certificate loading logic for mTLS. |
| src/opencertserver.cli/Program_SignCsr.cs | Tweaks CSR subject validation condition. |
Files not reviewed (1)
- tests/opencertserver.cli.tests/Features/GenerateKeys.feature.cs: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tests/opencertserver.cli.tests/StepDefinitions/OpenCertServerCliStepDefinitions.cs
Outdated
Show resolved
Hide resolved
tests/opencertserver.cli.tests/StepDefinitions/OpenCertServerCliStepDefinitions.cs
Show resolved
Hide resolved
Remove mention of MLDsa Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
… into features/cli-keygen
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
… into features/cli-keygen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add command to generate keys from CLI