Documentation ¶
Index ¶
- Variables
- func CreateCA(subject pkix.Name, duration time.Duration) ([]byte, []byte, error)
- func CreateClient(caPEM, caPrivKeyPEM []byte, certName pkix.Name, duration time.Duration) ([]byte, []byte, error)
- func CreateServer(caPEM, caPrivKeyPEM []byte, certName pkix.Name, ips []net.IP, ...) ([]byte, []byte, error)
- func DefaultCertificate() (*tls.Certificate, error)
- func KeyPair(domain string, expiration time.Time) ([]byte, []byte, error)
- func NewASN1EmailAddress(val string) pkix.AttributeTypeAndValue
- func NewASN1UnstructuredName(val string) pkix.AttributeTypeAndValue
- func PemCert(privKey *rsa.PrivateKey, domain string, expiration time.Time) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var OIDASN1EmailAddress = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 9, 1} //unstructuredName https://oidref.com/1.2.840.113549.1.9.1
View Source
var OIDASN1UnstructuredName = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 9, 2} //unstructuredName https://oidref.com/1.2.840.113549.1.9.2
Functions ¶
func CreateClient ¶ added in v2.0.9
func CreateServer ¶ added in v2.0.9
func DefaultCertificate ¶
func DefaultCertificate() (*tls.Certificate, error)
DefaultCertificate generates random TLS certificates.
func NewASN1EmailAddress ¶ added in v2.0.9
func NewASN1EmailAddress(val string) pkix.AttributeTypeAndValue
func NewASN1UnstructuredName ¶ added in v2.0.9
func NewASN1UnstructuredName(val string) pkix.AttributeTypeAndValue
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.