Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeCSRPEM ¶
func EncodeKeyPEM ¶
func EncodeKeyPEM(key *rsa.PrivateKey) []byte
func GenerateCSR ¶
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator handles certificate generation
func NewGenerator ¶
NewGenerator creates a new certificate generator
func (*Generator) GenerateAll ¶
GenerateAll generates CA and all required certificates
func (*Generator) GenerateCA ¶
GenerateCA generates a new CA certificate and private key
func (*Generator) GenerateCert ¶
GenerateCert generates a new certificate signed by the CA
func (*Generator) ValidateExistingCerts ¶
type Options ¶
type Options struct { // Organization name for the CA certificate Organization string // Common name for the CA certificate CommonName string // Valid duration for certificates ValidDays int // Key size in bits (e.g., 2048, 4096) KeySize int // Output directory for certificates OutputDir string // Hostnames to include in SAN Hostnames []string // IP addresses to include in SAN IPs []net.IP }
Options represents configuration for certificate generation
func DefaultOptions ¶
func DefaultOptions() *Options
DefaultOptions returns default certificate generation options
Click to show internal directories.
Click to hide internal directories.