Documentation ¶
Index ¶
- func CreateCa(keyPath string, certPath string) error
- func CreateCert(keyPath string, certPath string, parent *Cert) error
- func CreateCertAndSubject(keyPath string, certPath string, subject *pkix.Name) error
- func CreateCertGroup(subject *pkix.Name, caPath, certPath, keyPath string) error
- func CreateKuicCert(serverPath string, clientPath string) (err error)
- func CreateKuicServerCert(serverPath string) (err error)
- func CreateOrReadCaPem(savePath string) (caPem []byte, keyPem []byte, err error)
- func CreateOrReadCert(keyPath string, certPath string) error
- func CreateOrReadCertPem(serverName string, username string, caPem []byte, keyPem []byte, ...) (certPem []byte, keyPEM []byte, err error)
- func CreateOrReadKuicClientCert(serverCaPem []byte, clientCertPath string, clientCaPath string) (clientCaPem []byte, clientCertPem []byte, clientKeyPEM []byte, err error)
- func CreateOrReadKuicServerCertPem(serverPath string) (serverName string, serverCaPem []byte, serverCertPem []byte, ...)
- func ReadCertificateForPem(certPath string) (*x509.Certificate, error)
- func ReadKuicCert(certPath string) (ca *x509.Certificate, cert *tls.Certificate, certificate *x509.Certificate, ...)
- func ReadRsaPrivateKeyForPem(keyPath string) (*rsa.PrivateKey, error)
- type Cert
- type Certificate
- type Manager
- func (m *Manager) CreateClientCert(username string) (*Certificate, error)
- func (m *Manager) CreateOrReadClientKuicCertFile(username string) (string, *Certificate, error)
- func (m *Manager) GetCertPool() *x509.CertPool
- func (m *Manager) GetServerCertificate() *tls.Certificate
- func (m *Manager) GetServerName() string
- func (m *Manager) Init() (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCertAndSubject ¶ added in v0.0.11
func CreateCertGroup ¶ added in v0.0.11
func CreateKuicCert ¶ added in v0.0.13
func CreateKuicServerCert ¶ added in v0.0.13
func CreateOrReadCaPem ¶ added in v0.0.19
func CreateOrReadCert ¶
func CreateOrReadCertPem ¶ added in v0.0.19
func CreateOrReadKuicClientCert ¶ added in v0.0.13
func CreateOrReadKuicServerCertPem ¶ added in v0.0.13
func ReadCertificateForPem ¶ added in v0.0.11
func ReadCertificateForPem(certPath string) (*x509.Certificate, error)
func ReadKuicCert ¶ added in v0.0.13
func ReadKuicCert(certPath string) (ca *x509.Certificate, cert *tls.Certificate, certificate *x509.Certificate, err error)
func ReadRsaPrivateKeyForPem ¶ added in v0.0.11
func ReadRsaPrivateKeyForPem(keyPath string) (*rsa.PrivateKey, error)
Types ¶
type Cert ¶ added in v0.0.11
type Cert struct { CSR *x509.Certificate CertKey *rsa.PrivateKey CERT []byte }
type Certificate ¶ added in v0.0.13
type Certificate struct { Cert *tls.Certificate CaPem []byte ServerName string UserName string }
func ParseClientKuicCertBytes ¶ added in v0.1.5
func ParseClientKuicCertBytes(data []byte) (*Certificate, error)
func ParseClientKuicCertFile ¶ added in v0.1.5
func ParseClientKuicCertFile(certPath string) (string, *Certificate, error)
type Manager ¶ added in v0.0.13
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶ added in v0.0.13
func (*Manager) CreateClientCert ¶ added in v0.0.13
func (m *Manager) CreateClientCert(username string) (*Certificate, error)
func (*Manager) CreateOrReadClientKuicCertFile ¶ added in v0.1.5
func (m *Manager) CreateOrReadClientKuicCertFile(username string) (string, *Certificate, error)
func (*Manager) GetCertPool ¶ added in v0.0.13
func (*Manager) GetServerCertificate ¶ added in v0.0.13
func (m *Manager) GetServerCertificate() *tls.Certificate
func (*Manager) GetServerName ¶ added in v0.0.15
Click to show internal directories.
Click to hide internal directories.