certificate

package
v0.0.0-...-b4c5328 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExportCertToPFX

func ExportCertToPFX(pfxPath string, priv *rsa.PrivateKey, cert *x509.Certificate, password string) error

ExportCertToPFX exports the certificate and private key to a PFX file.

func GenerateCertificate

func GenerateCertificate(outputPath, password string, details CertificateDetails, bits int) error

GenerateCertificate generates an x509 certificate and stores it in the specified output path.

func HandlePassword

func HandlePassword() (string, error)

HandlePassword handles prompting the user to enter and confirm a password.

func HandleX509Generation

func HandleX509Generation(bits int) error

HandleX509Generation handles the entire process of generating an x509 certificate.

func PromptPassword

func PromptPassword(label string) (string, error)

PromptPassword prompts the user to enter a password with masking and validation.

Types

type CertificateDetails

type CertificateDetails struct {
	CommonName    string
	Organization  string
	Country       string
	ValidityYears int // New field for the certificate validity period in years
}

CertificateDetails contains the details for the certificate.

Jump to

Keyboard shortcuts

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