feat: Command that generates a private key with well known params.
This commit is contained in:
1 parent
56fc799cf6
commit
6eb97bb780
7 files changed
+143
No files matched your search
@@ -0,0 +1,29 @@
|
||||
package hmpki
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
// Get a root cobra command going, then code for generating:
|
||||
// - Generate CA key
|
||||
// - Generate CA cert
|
||||
// - Generate server cert/key
|
||||
// - Generate client cert/key
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "hmpki",
|
||||
Short: "Generate keys/certs with set roles for mTLS auth between services",
|
||||
// Run: func(cmd *cobra.Command, args []string) {
|
||||
// fmt.Println("I'm a cobra command!")
|
||||
// },
|
||||
}
|
||||
|
||||
func Execute() {
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user