Documentation
¶
Index ¶
- Variables
- func CheckCRL(args []string)
- func CheckCRLCmd(args []string) error
- func CheckOCSPStatus(args []string)
- func CheckOCSPStatusCmd(args []string) error
- func CreateOCSPRequest(args []string)
- func CreateOCSPRequestCmd(args []string) error
- func DecodeCert(args []string)
- func DecodeCertCmd(args []string) error
- func EncodeCert(args []string)
- func EncodeCertCmd(args []string) error
- func GenerateCA(args []string)
- func GenerateCACmd(args []string) error
- func GenerateCRL(args []string)
- func GenerateCRLCmd(args []string) error
- func GenerateCSR(args []string)
- func GenerateCSRCmd(args []string) error
- func GenerateCSRFromFile(configPath string)
- func GenerateCSRFromFileCmd(configPath string) error
- func GenerateCert(args []string)
- func GenerateCertCmd(args []string) error
- func GenerateCertFromFile(configPath string)
- func GenerateCertFromFileCmd(configPath string) error
- func GenerateOCSPResponse(args []string)
- func GenerateOCSPResponseCmd(args []string) error
- func RootCommand() *cliv3.Command
- func SignCert(args []string)
- func SignCertCmd(args []string) error
- func SummaryTable(details map[string]interface{})
- func ValidateCert(args []string)
- func ValidateCertCmd(args []string) error
- func VerifyOCSPResponse(args []string)
- func VerifyOCSPResponseCmd(args []string) error
- func ViewCA(args []string)
- func ViewCACmd(args []string) error
- func ViewCRL(args []string)
- func ViewCRLCmd(args []string) error
- func ViewCSR(args []string)
- func ViewCSRCmd(args []string) error
- func ViewCert(args []string)
- func ViewCertCmd(args []string) error
- func ViewCertificateDetails(certFile string)
- func ViewCertificateDetailsCmd(certFile string) error
- type InteractiveMode
- func (im *InteractiveMode) ConfirmGeneration() bool
- func (im *InteractiveMode) PromptCertificateType() string
- func (im *InteractiveMode) PromptDNSNames() []string
- func (im *InteractiveMode) PromptEmailAddresses() []string
- func (im *InteractiveMode) PromptExtendedKeyUsageOIDs() []string
- func (im *InteractiveMode) PromptFileOutput(defaultName string) string
- func (im *InteractiveMode) PromptIPAddresses() []net.IP
- func (im *InteractiveMode) PromptInt(prompt string, defaultValue int) int
- func (im *InteractiveMode) PromptKeyType() string
- func (im *InteractiveMode) PromptString(prompt, defaultValue string) string
- func (im *InteractiveMode) PromptStringSlice(prompt string) []string
- func (im *InteractiveMode) PromptSubjectInfo() map[string]string
- func (im *InteractiveMode) PromptValidity() int
- func (im *InteractiveMode) PromptYesNo(prompt string, defaultYes bool) bool
- type MenuMode
Constants ¶
This section is empty.
Variables ¶
var ErrSilent = errors.New("silent")
ErrSilent signals that the error's message has already been printed to stderr by the code that produced it (e.g. an "Unknown X subcommand" line), so the top-level caller in cmd/certifier/main.go should set a non-zero exit code without printing anything further.
Functions ¶
func CheckCRL ¶ added in v1.0.0
func CheckCRL(args []string)
CheckCRL checks whether a certificate is revoked according to a CRL (wrapper that calls CheckCRLCmd and handles exit)
func CheckCRLCmd ¶ added in v1.0.0
CheckCRLCmd checks whether a certificate is revoked according to a CRL and returns an error instead of exiting
func CheckOCSPStatus ¶ added in v1.0.0
func CheckOCSPStatus(args []string)
CheckOCSPStatus checks a certificate's revocation status against a live OCSP responder (wrapper that calls CheckOCSPStatusCmd and handles exit).
func CheckOCSPStatusCmd ¶ added in v1.0.0
CheckOCSPStatusCmd checks a certificate's revocation status against a live OCSP responder and returns an error instead of exiting.
func CreateOCSPRequest ¶ added in v1.0.0
func CreateOCSPRequest(args []string)
CreateOCSPRequest creates an OCSP request (wrapper that calls CreateOCSPRequestCmd and handles exit)
func CreateOCSPRequestCmd ¶ added in v1.0.0
CreateOCSPRequestCmd creates an OCSP request and returns an error instead of exiting
func DecodeCert ¶ added in v1.0.0
func DecodeCert(args []string)
DecodeCert converts a DER or PKCS12 certificate back to PEM (wrapper that calls DecodeCertCmd and handles exit)
func DecodeCertCmd ¶ added in v1.0.0
DecodeCertCmd converts a DER or PKCS12 certificate back to PEM and returns an error instead of exiting
func EncodeCert ¶ added in v1.0.0
func EncodeCert(args []string)
EncodeCert converts a PEM certificate to DER or PKCS12 (wrapper that calls EncodeCertCmd and handles exit)
func EncodeCertCmd ¶ added in v1.0.0
EncodeCertCmd converts a PEM certificate to DER or PKCS12 and returns an error instead of exiting
func GenerateCA ¶
func GenerateCA(args []string)
GenerateCA generates a CA certificate (wrapper that calls GenerateCACmd and handles exit)
func GenerateCACmd ¶
GenerateCACmd generates a CA certificate and returns an error instead of exiting
func GenerateCRL ¶ added in v1.0.0
func GenerateCRL(args []string)
GenerateCRL generates a Certificate Revocation List (wrapper that calls GenerateCRLCmd and handles exit)
func GenerateCRLCmd ¶ added in v1.0.0
GenerateCRLCmd generates a Certificate Revocation List and returns an error instead of exiting
func GenerateCSR ¶
func GenerateCSR(args []string)
GenerateCSR generates a Certificate Signing Request (wrapper that calls GenerateCSRCmd and handles exit)
func GenerateCSRCmd ¶
GenerateCSRCmd generates a Certificate Signing Request and returns an error instead of exiting
func GenerateCSRFromFile ¶
func GenerateCSRFromFile(configPath string)
GenerateCSRFromFile generates CSRs from a configuration file
func GenerateCSRFromFileCmd ¶
GenerateCSRFromFileCmd generates CSRs from a config file and returns an error
func GenerateCert ¶
func GenerateCert(args []string)
GenerateCert generates a certificate (wrapper that calls GenerateCertCmd and handles exit)
func GenerateCertCmd ¶
GenerateCertCmd generates a certificate and returns an error instead of exiting
func GenerateCertFromFile ¶
func GenerateCertFromFile(configPath string)
GenerateCertFromFile generates certificates and CSRs from a configuration file
func GenerateCertFromFileCmd ¶
GenerateCertFromFileCmd generates certificates from a config file and returns an error
func GenerateOCSPResponse ¶ added in v1.0.0
func GenerateOCSPResponse(args []string)
GenerateOCSPResponse generates an OCSP response (wrapper that calls GenerateOCSPResponseCmd and handles exit)
func GenerateOCSPResponseCmd ¶ added in v1.0.0
GenerateOCSPResponseCmd generates an OCSP response and returns an error instead of exiting
func RootCommand ¶ added in v1.0.0
RootCommand builds the full certifier command tree.
func SignCert ¶ added in v1.0.0
func SignCert(args []string)
SignCert signs a CSR with a CA (wrapper that calls SignCertCmd and handles exit)
func SignCertCmd ¶ added in v1.0.0
SignCertCmd signs a CSR with a CA to produce a certificate and returns an error instead of exiting
func SummaryTable ¶
func SummaryTable(details map[string]interface{})
SummaryTable displays a summary of certificate details before generation
func ValidateCert ¶ added in v1.0.0
func ValidateCert(args []string)
ValidateCert validates a certificate (wrapper that calls ValidateCertCmd and handles exit)
func ValidateCertCmd ¶ added in v1.0.0
ValidateCertCmd validates a certificate and returns an error instead of exiting
func VerifyOCSPResponse ¶ added in v1.0.0
func VerifyOCSPResponse(args []string)
VerifyOCSPResponse verifies an OCSP response (wrapper that calls VerifyOCSPResponseCmd and handles exit)
func VerifyOCSPResponseCmd ¶ added in v1.0.0
VerifyOCSPResponseCmd verifies an OCSP response and returns an error instead of exiting
func ViewCA ¶
func ViewCA(args []string)
ViewCA views CA details (wrapper that calls ViewCACmd and handles exit)
func ViewCRL ¶ added in v1.0.0
func ViewCRL(args []string)
ViewCRL displays CRL details (wrapper that calls ViewCRLCmd and handles exit)
func ViewCRLCmd ¶ added in v1.0.0
ViewCRLCmd displays CRL details and returns an error instead of exiting
func ViewCSR ¶ added in v1.0.0
func ViewCSR(args []string)
ViewCSR displays CSR details (wrapper that calls ViewCSRCmd and handles exit)
func ViewCSRCmd ¶ added in v1.0.0
ViewCSRCmd displays CSR details and returns an error instead of exiting
func ViewCert ¶
func ViewCert(args []string)
ViewCert views certificate details (wrapper that calls ViewCertCmd and handles exit)
func ViewCertCmd ¶
ViewCert views certificate details ViewCertCmd views certificate details and returns an error instead of exiting
func ViewCertificateDetails ¶
func ViewCertificateDetails(certFile string)
ViewCertificateDetails displays certificate information (wrapper that calls ViewCertificateDetailsCmd and handles exit)
func ViewCertificateDetailsCmd ¶
ViewCertificateDetailsCmd displays certificate information and returns an error instead of exiting
Types ¶
type InteractiveMode ¶
type InteractiveMode struct {
// contains filtered or unexported fields
}
InteractiveMode enables interactive prompting for certificate generation
func NewInteractiveMode ¶
func NewInteractiveMode() *InteractiveMode
NewInteractiveMode creates a new interactive mode instance
func (*InteractiveMode) ConfirmGeneration ¶
func (im *InteractiveMode) ConfirmGeneration() bool
ConfirmGeneration asks for confirmation before generating certificate
func (*InteractiveMode) PromptCertificateType ¶
func (im *InteractiveMode) PromptCertificateType() string
PromptCertificateType prompts for certificate type (client, server, or both)
func (*InteractiveMode) PromptDNSNames ¶
func (im *InteractiveMode) PromptDNSNames() []string
PromptDNSNames prompts for DNS names (SANs)
func (*InteractiveMode) PromptEmailAddresses ¶
func (im *InteractiveMode) PromptEmailAddresses() []string
PromptEmailAddresses prompts for email addresses
func (*InteractiveMode) PromptExtendedKeyUsageOIDs ¶
func (im *InteractiveMode) PromptExtendedKeyUsageOIDs() []string
PromptExtendedKeyUsageOIDs prompts for custom Extended Key Usage OIDs
func (*InteractiveMode) PromptFileOutput ¶
func (im *InteractiveMode) PromptFileOutput(defaultName string) string
PromptFileOutput prompts for output file paths
func (*InteractiveMode) PromptIPAddresses ¶
func (im *InteractiveMode) PromptIPAddresses() []net.IP
PromptIPAddresses prompts for IP addresses (SANs)
func (*InteractiveMode) PromptInt ¶
func (im *InteractiveMode) PromptInt(prompt string, defaultValue int) int
PromptInt prompts for an integer value with optional default
func (*InteractiveMode) PromptKeyType ¶
func (im *InteractiveMode) PromptKeyType() string
func (*InteractiveMode) PromptString ¶
func (im *InteractiveMode) PromptString(prompt, defaultValue string) string
PromptString prompts for a string value with optional default
func (*InteractiveMode) PromptStringSlice ¶
func (im *InteractiveMode) PromptStringSlice(prompt string) []string
PromptStringSlice prompts for multiple string values (one per line, empty to finish)
func (*InteractiveMode) PromptSubjectInfo ¶
func (im *InteractiveMode) PromptSubjectInfo() map[string]string
PromptSubjectInfo prompts for subject information
func (*InteractiveMode) PromptValidity ¶
func (im *InteractiveMode) PromptValidity() int
PromptValidity prompts for certificate validity period
func (*InteractiveMode) PromptYesNo ¶
func (im *InteractiveMode) PromptYesNo(prompt string, defaultYes bool) bool
PromptYesNo prompts for yes/no confirmation
type MenuMode ¶
type MenuMode struct {
// contains filtered or unexported fields
}
MenuMode handles the main interactive menu interface
func (*MenuMode) DisplayMainMenu ¶
func (m *MenuMode) DisplayMainMenu()
DisplayMainMenu shows the main menu and handles command routing