2023-03-01 21:30:16 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
"src.lwithers.me.uk/go/rsa/cmd/ca"
|
|
|
|
"src.lwithers.me.uk/go/rsa/cmd/csr"
|
2023-04-29 11:55:41 +01:00
|
|
|
"src.lwithers.me.uk/go/rsa/cmd/derive"
|
2023-03-01 21:30:16 +00:00
|
|
|
"src.lwithers.me.uk/go/rsa/cmd/inspect"
|
|
|
|
"src.lwithers.me.uk/go/rsa/cmd/keygen"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
root := &cobra.Command{
|
|
|
|
Use: "rsa",
|
|
|
|
Short: "RSA key and certificate manipulation",
|
|
|
|
}
|
|
|
|
|
|
|
|
inspect.Register(root)
|
|
|
|
keygen.Register(root)
|
|
|
|
csr.Register(root)
|
|
|
|
ca.Register(root)
|
2023-04-29 11:55:41 +01:00
|
|
|
derive.Register(root)
|
2023-03-01 21:30:16 +00:00
|
|
|
|
|
|
|
if err := root.Execute(); err != nil {
|
|
|
|
// error will already have been displayed
|
|
|
|
os.Exit(1)
|
|
|
|
}
|
|
|
|
}
|