Documentation ¶
Index ¶
- func Files(dir string, files []string, f func() ([][]byte, error)) ([][]byte, error)
- func Hash(conn *tls.Conn) string
- func VerifyCertificate(cert []byte, ca []byte, i ...[]byte) error
- type Config
- func (cfg *Config) Build() (*Config, error)
- func (cfg *Config) Dial(addr string) (*tls.Conn, error)
- func (cfg *Config) Listen(addr string, handler func(conn *tls.Conn)) (*Listener, error)
- func (cfg *Config) Present(certPEMBlock []byte, keyPEMBlock []byte) *Config
- func (cfg *Config) Trust(certPEMBlock []byte) *Config
- func (cfg *Config) Tunnel(addr string, handler func(conn *tls.Conn)) (*Tunnel, error)
- type EcdsaCurve
- type KeyType
- type Keygen
- type Listener
- type Profile
- type Registry
- func (reg *Registry) Add(certPEMBlock []byte) error
- func (reg *Registry) CertificatePool() (*x509.CertPool, error)
- func (reg *Registry) Certificates() ([]*x509.Certificate, error)
- func (reg *Registry) Entries() []*RegistryEntry
- func (reg *Registry) Generate() (*big.Int, error)
- func (reg *Registry) Revoke(serial []byte) error
- type RegistryEntry
- type Tunnel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
CA holds the
type EcdsaCurve ¶
type EcdsaCurve string
const ( EcdsaCurveP224 EcdsaCurve = "P224" EcdsaCurveP256 EcdsaCurve = "P256" EcdsaCurveP384 EcdsaCurve = "P384" EcdsaCurveP521 EcdsaCurve = "P521" )
type Keygen ¶
type Keygen struct {
// contains filtered or unexported fields
}
func NewKeygenECDSA ¶
func NewKeygenECDSA(ecdsaCurve EcdsaCurve) *Keygen
func NewKeygenRSA ¶
type Profile ¶
func ParseProfile ¶
type Registry ¶
type Registry struct { UniqueCN bool `json:"unique"` Counter int `json:"counter"` Certs []*RegistryEntry `json:"certs"` // contains filtered or unexported fields }
func LoadRegistry ¶
func (*Registry) CertificatePool ¶
get a pool with all loadable certificates
func (*Registry) Certificates ¶
func (reg *Registry) Certificates() ([]*x509.Certificate, error)
get list of all certificates
type RegistryEntry ¶
type RegistryEntry struct { ID int `json:"id"` Name string `json:"name"` Serial []byte `json:"serial"` Revoked bool `json:"revoked,omitempty"` }
func (*RegistryEntry) FileName ¶
func (entry *RegistryEntry) FileName() string
Click to show internal directories.
Click to hide internal directories.