Documentation ¶
Overview ¶
certs.go - generate TLS certificates.
To the extent possible under law, Ivan Markin has waived all copyright and related or neighboring rights to tlspin, using the Creative Commons "CC0" public domain dedication. See LICENSE or <http://creativecommons.org/publicdomain/zero/1.0/> for full details.
encoding.go - encode keys.
To the extent possible under law, Ivan Markin has waived all copyright and related or neighboring rights to tlspin, using the Creative Commons "CC0" public domain dedication. See LICENSE or <http://creativecommons.org/publicdomain/zero/1.0/> for full details.
Index ¶
- func DecodeKey(data string) ([]byte, error)
- func EncodeKey(k []byte) string
- func GenerateCertificate(skstr string) (*tls.Certificate, error)
- func GenerateEphemeralCert(sk interface{}) ([]byte, error)
- func GeneratePEMKeypair(skstr string) (cert []byte, privkey []byte, err error)
- func GeneratePrivateKey() (string, error)
- func GenerateRawPrivateKey(r io.Reader, signalg string) (sk interface{}, err error)
- func InitDial(network, addr string) (conn net.Conn, keydigest []byte, err error)
- func InitDialWithDialer(dialer *net.Dialer, network, addr string) (conn net.Conn, keydigest []byte, err error)
- func LoadKeyFromFile(filename string) (string, error)
- func MarshalPrivateKeyToPEM(sk interface{}) (*pem.Block, error)
- func PublicKey(skstr string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateCertificate ¶
func GenerateCertificate(skstr string) (*tls.Certificate, error)
func GenerateEphemeralCert ¶
GenerateEphemeralCert generates an ephemeral TLS certificate from private key sk in reproducible manner: every call to GenerateEphemeralCert with the same sk value it produces exactly the same certificate.
func GeneratePEMKeypair ¶
func GeneratePrivateKey ¶
func GenerateRawPrivateKey ¶
func InitDialWithDialer ¶
func LoadKeyFromFile ¶
LoadKey loads private key from a file in base64-encoded form
func MarshalPrivateKeyToPEM ¶
Types ¶
This section is empty.