Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CA ¶
type CA interface {
GetRootCA() *x509.Certificate
GetCert(commonName string) (*tls.Certificate, error)
}
func NewSelfSignCA ¶
NewSelfSignCA Load ca from store path or create new ca then store
func NewSelfSignCAMemory ¶
NewSelfSignCAMemory Create new ca only live in memory, will change when process restart
type SelfSignCA ¶
type SelfSignCA struct {
rsa.PrivateKey
RootCert x509.Certificate
StorePath string
// contains filtered or unexported fields
}
func (*SelfSignCA) DummyCert ¶
func (ca *SelfSignCA) DummyCert(commonName string) (*tls.Certificate, error)
TODO: 是否应该支持多个 SubjectAltName
func (*SelfSignCA) GetCert ¶
func (ca *SelfSignCA) GetCert(commonName string) (*tls.Certificate, error)
func (*SelfSignCA) GetRootCA ¶
func (ca *SelfSignCA) GetRootCA() *x509.Certificate
Click to show internal directories.
Click to hide internal directories.