Documentation ¶
Overview ¶
Package tunnel eases creation of simple TLS connection over insecure network between safe, fully controlled endpoints.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Serve ¶
func Serve(tcpPort uint, cert *KeyPair, otherPubKey *x509.Certificate, handler ClientHandler) error
Types ¶
type KeyPair ¶
type KeyPair struct {
// contains filtered or unexported fields
}
Private + public key information.
func Keygen ¶
Generates a randomized 1024b RSA self-signed private+public key set. The key is not useful out of this package (e.g. in fully-fledged TLS), as it is set to be marked as expired by the time it is created.
func (KeyPair) PEMEncoded ¶
Serialize the private+public key pair using PEM encoding.
func (KeyPair) Pub ¶
func (pair KeyPair) Pub() *x509.Certificate
Get the public part of the key pair.
Click to show internal directories.
Click to hide internal directories.