Documentation
¶
Overview ¶
Package mkcert is a simple zero-config tool to make development certificates.
Index ¶
- Variables
- type CertificateOptions
- type Client
- func (c *Client) GenerateCertificate(hosts []string) error
- func (c *Client) GenerateCertificateFromCSR(csrPath, certFile string) error
- func (c *Client) GenerateCertificateWithOptions(opts CertificateOptions) error
- func (c *Client) GetCARoot() string
- func (c *Client) Install() error
- func (c *Client) IsCAInstalled() bool
- func (m Client) Run(args []string)
- func (c *Client) SetCARoot(path string)
- func (c *Client) Uninstall() error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( FirefoxProfiles = []string{os.Getenv("HOME") + "/.mozilla/firefox/*", os.Getenv("HOME") + "/snap/firefox/common/.mozilla/firefox/*"} NSSBrowsers = "Firefox and/or Chrome/Chromium" SystemTrustFilename string SystemTrustCommand []string CertutilInstallHelp string )
View Source
var Version string
Version can be set at link time to override debug.BuildInfo.Main.Version, which is "(devel)" when building from within the module. See golang.org/issue/29814 and golang.org/issue/29228.
Functions ¶
This section is empty.
Types ¶
type CertificateOptions ¶
type CertificateOptions struct {
// List of hostnames, IPs, emails, or URIs for the certificate
Hosts []string
// Custom certificate file path
CertFile string
// Custom key file path
KeyFile string
// Custom PKCS#12 file path
P12File string
// Certificate for client authentication
Client bool
// Certificate with an ECDSA key instead of RSA
ECDSA bool
// PKCS#12 file instead of separate cert/key files
PKCS12 bool
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents an mkcert client that can install/uninstall CA certificates and generate new certificates.
func NewClientWithCARoot ¶
func (*Client) GenerateCertificate ¶
func (*Client) GenerateCertificateFromCSR ¶
GenerateCertificateFromCSR generates a certificate from a Certificate Signing Request.
func (*Client) GenerateCertificateWithOptions ¶
func (c *Client) GenerateCertificateWithOptions(opts CertificateOptions) error
GenerateCertificateWithOptions generates a new certificate with advanced options.
func (*Client) IsCAInstalled ¶
IsCAInstalled checks if the CA is installed in the system trust store.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.
