Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrWrongIdentity = errors.New("unknown identity")
)
Functions ¶
This section is empty.
Types ¶
type ClientConfig ¶
func ClientFromString ¶
func ClientFromString(privkey string, server string) (*ClientConfig, error)
func (*ClientConfig) VerifyPeerCertificate ¶
func (c *ClientConfig) VerifyPeerCertificate(rawCerts [][]byte, _ [][]*x509.Certificate) error
type Config ¶
type Config struct {
PrivateKey PrivateKey
}
type PrivateKey ¶
type PrivateKey ed25519.PrivateKey
func PrivateFromString ¶
func PrivateFromString(s string) (PrivateKey, error)
func PrivateGenerate ¶
func PrivateGenerate() (PrivateKey, error)
func (PrivateKey) GenerateTLS ¶
func (p PrivateKey) GenerateTLS(mode TLSMode) (*tls.Certificate, error)
func (PrivateKey) Public ¶
func (p PrivateKey) Public() PublicKey
func (PrivateKey) String ¶
func (p PrivateKey) String() string
type PublicKey ¶
func PublicFromString ¶
type ServerConfig ¶
func ServerFromString ¶
func ServerFromString(privkey string, allowed []string) (*ServerConfig, error)
func (*ServerConfig) VerifyPeerCertificate ¶
func (s *ServerConfig) VerifyPeerCertificate(rawCerts [][]byte, _ [][]*x509.Certificate) error
Click to show internal directories.
Click to hide internal directories.