Documentation ¶
Overview ¶
Package selfsign is a test helper that generates self signed certificate.
Index ¶
- func GenerateSelfSigned() (tls.Certificate, error)
- func GenerateSelfSigned25519() (tls.Certificate, error)
- func GenerateSelfSignedWithDNS(cn string, sans ...string) (tls.Certificate, error)
- func SelfSign(key crypto.PrivateKey) (tls.Certificate, error)
- func WithDNS(key crypto.PrivateKey, cn string, sans ...string) (tls.Certificate, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateSelfSigned ¶
func GenerateSelfSigned() (tls.Certificate, error)
GenerateSelfSigned creates a self-signed certificate
func GenerateSelfSigned25519 ¶
func GenerateSelfSigned25519() (tls.Certificate, error)
创建自签名证书 用于 TLS/SSL 连接以获得它的好处,P2P网络中的客户端会忽略证书的验证。 签名算法:ed25519
func GenerateSelfSignedWithDNS ¶
func GenerateSelfSignedWithDNS(cn string, sans ...string) (tls.Certificate, error)
GenerateSelfSignedWithDNS creates a self-signed certificate
func SelfSign ¶
func SelfSign(key crypto.PrivateKey) (tls.Certificate, error)
SelfSign creates a self-signed certificate from a elliptic curve key
func WithDNS ¶
func WithDNS(key crypto.PrivateKey, cn string, sans ...string) (tls.Certificate, error)
WithDNS creates a self-signed certificate from a elliptic curve key
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.