cmd

package
v0.0.0-...-6bd0673 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ECDSA = &cobra.Command{
	Use:   "ecdsa",
	Short: "Generate an ECDSA Certificate Signing Request",
	Run: func(_ *cobra.Command, _ []string) {
		common, ecdsaArgs := args.CommonArgs(), args.ECDSAArgs()

		key, err := ecdsa.LoadOrGeneratePrivateKey(common, ecdsaArgs)
		if err != nil {
			panic(err)
		}

		if err := ecdsaArgs.DecodeCurve(); err != nil {
			panic(err)
		}

		if err := easycsr.Build(key, common); err != nil {
			panic(err)
		}
	},
}
View Source
var RSA = &cobra.Command{
	Use:   "rsa",
	Short: "Generate an RSA Certificate Signing Request",
	Run: func(_ *cobra.Command, _ []string) {
		common, rsaArgs := args.CommonArgs(), args.RSAArgs()

		key, err := rsa.LoadOrGeneratePrivateKey(common, rsaArgs)
		if err != nil {
			panic(err)
		}

		if err := common.DecodeRSASigAlg(); err != nil {
			panic(err)
		}

		if err := easycsr.Build(key, common); err != nil {
			panic(err)
		}
	},
}

Functions

func Execute

func Execute()

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL