Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddTrustedCert ¶
AddTrustedCert adds given the certificate the user's keychain.
func GenerateSelfSignedCert ¶
GenerateSelfSignedCert generates a self-signed X.509 certificate for testing purposes. It supports ECDSA curve P256 or RSA 2048 bits to generate the key. based on: https://golang.org/src/crypto/tls/generate_cert.go
Types ¶
type Options ¶
type Options struct { KeyFile string // path to the server private key file CertFile string // path to the fullchain certificate file Hosts string // comma-separated hostnames and IPs to generate a certificate for. ValidFrom time.Time // creation date (default duration is 1 year) ValidFor time.Duration // for how long the certificate is valid. KeyType string // default ECDSA curve P256 }
Options for generating a self-signed certificate.
Click to show internal directories.
Click to hide internal directories.