feat: Command that generates a private key with well known params.

This commit is contained in:
jmug committed 2026-10-20 14:29:22 -07:00
1 parent 56fc799cf6
commit 6eb97bb780
7 files changed
+143

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
package hmpki
import (
"github.com/spf13/cobra"
)
var Output string
func init() {
rootCmd.AddCommand(generateCmd)
// All "generate" commands output an artifact to a file,
// be it a key or a cert, etc.
generateCmd.PersistentFlags().StringVarP(
&Output,
"output",
"o",
"",
"output filename",
)
generateCmd.MarkPersistentFlagRequired("output")
generateCmd.MarkPersistentFlagFilename("output")
}
var generateCmd = &cobra.Command{
Use: "generate",
Short: "Generate pki resources (keys/certs)",
}