Documentation ¶
Index ¶
- Constants
- Variables
- func ParsePrivateKey(data []byte) (crypto.PrivateKey, error)
- type CertType
- type KeyPair
- func GenerateCA(keyType KeyType, subject pkix.Name) (*KeyPair, error)
- func NewCert(parent x509.Certificate, parentKey crypto.Signer, certType CertType, ...) (KeyPair, error)
- func NewSelfSignedCert(certType CertType, keyType KeyType, hosts ...string) (KeyPair, error)
- func ToKeyPair(key crypto.PrivateKey, cert []byte) (*KeyPair, error)
- type KeyType
Constants ¶
Variables ¶
View Source
var DefaultKeyType = RSAKeyType
View Source
var DefaultValidityPeriod = 10 * 365 * 24 * time.Hour
Functions ¶
func ParsePrivateKey ¶
func ParsePrivateKey(data []byte) (crypto.PrivateKey, error)
ParsePrivateKey parses an ASN.1 DER-encoded private key. This is basically what tls.X509KeyPair does internally.
Types ¶
Click to show internal directories.
Click to hide internal directories.