func NewSignCommand() *SignCommand {
	return &SignCommand{
		ui:  newColoredUI(),
		pki: pki.NewX509Manager(),
	}
}
NewSignCommand creates a new command
package cli
import (
	"flag"
	"fmt"
	"strings"
	"github.com/mitchellh/cli"
	"github.com/moorara/gocert/pki"
)
const (
	signSuccess        = " ✓ Signed %s"
	signFailure        = " ✗ Failed to sign %s. Error: %s"
	signEnterNameCA    = "\nENTER NAME FOR CERTIFICATE AUTHORITY ..."
	signEnterNameCSR   = "\nENTER NAME FOR CERTIFICATE SIGNING REQUEST ..."
	signEnterConfigCA  = "\nENTER CONFIGURATIONS FOR CERTIFICATE AUTHORITY ..."
	signEnterConfigCSR = "\nENTER CONFIGURATIONS FOR NEW CERTIFICATE ..."
	signSynopsis = `Signs a certificate signing request.`
	signHelp     = `
	You can use this command to sign a certificate signing request (CSR) and create a new certificate.
	You will be asked for entering the password for certificate authorithy.
	The root certificate authorithy can only sign intermediate certificate authorities.
	Intermediate certificate authorities can then sign other intermediate certificate authorities or server/client certificates.
	Flags:
		-ca      the name of certificate authorithy
		-name    the name of certificate signing request
	`
)
type SignCommand struct {
	ui  cli.Ui
	pki pki.Manager
}