Documentation ¶
Index ¶
- Constants
- func GenerateCA(opts CAOpts) (string, string, error)
- func GenerateCert(opts CertOpts) (string, string, error)
- func GeneratePrivateKey() (crypto.Signer, string, error)
- func GeneratePrivateKeyWithConfig(keyType string, keyBits int) (crypto.Signer, string, error)
- func GenerateSerialNumber() (*big.Int, error)
- func ParseSigner(pemValue string) (crypto.Signer, error)
- func Verify(caString, certString, dns string) error
- type CAOpts
- type CertOpts
Constants ¶
View Source
const ( DefaultPrivateKeyType = "ec" DefaultPrivateKeyBits = 256 DefaultIntermediateCertTTL = 24 * 365 * time.Hour )
Variables ¶
This section is empty.
Functions ¶
func GenerateCA ¶
GenerateCA generates a new CA for agent TLS (not to be confused with Connect TLS)
func GenerateCert ¶
GenerateCert generates a new certificate for TLS
func GeneratePrivateKeyWithConfig ¶
GeneratePrivateKey generates a new Private key
func GenerateSerialNumber ¶
GenerateSerialNumber returns random bigint generated with crypto/rand
func ParseSigner ¶
ParseSigner parses a crypto.Signer from a PEM-encoded key. The private key is expected to be the first block in the PEM value.
Types ¶
Click to show internal directories.
Click to hide internal directories.