cli

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2025 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCA

func GenerateCA(args []string)

GenerateCA generates a CA certificate (wrapper that calls GenerateCACmd and handles exit)

func GenerateCACmd

func GenerateCACmd(args []string) error

GenerateCACmd generates a CA certificate 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

func GenerateCSRCmd(args []string) error

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

func GenerateCSRFromFileCmd(configPath string) error

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

func GenerateCertCmd(args []string) error

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

func GenerateCertFromFileCmd(configPath string) error

GenerateCertFromFileCmd generates certificates from a config file and returns an error

func SummaryTable

func SummaryTable(details map[string]interface{})

SummaryTable displays a summary of certificate details before generation

func ViewCA

func ViewCA(args []string)

ViewCA views CA details (wrapper that calls ViewCACmd and handles exit)

func ViewCACmd

func ViewCACmd(args []string) error

ViewCA views CA certificate details ViewCACmd views CA 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

func ViewCertCmd(args []string) error

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

func ViewCertificateDetailsCmd(certFile string) error

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 struct {
	// contains filtered or unexported fields
}

MenuMode handles the main interactive menu interface

func NewMenuMode

func NewMenuMode() *MenuMode

NewMenuMode creates a new menu mode handler

func (m *MenuMode) DisplayMainMenu()

DisplayMainMenu shows the main menu and handles command routing

Jump to

Keyboard shortcuts

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