tlspinutil

package
v2.1.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2018 License: CC0-1.0 Imports: 17 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeKey

func DecodeKey(data string) ([]byte, error)

func EncodeKey

func EncodeKey(k []byte) string

func GenerateCertificate

func GenerateCertificate(skstr string) (*tls.Certificate, error)

func GenerateEphemeralCert

func GenerateEphemeralCert(sk interface{}) ([]byte, error)

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 GeneratePEMKeypair(skstr string) (cert []byte, privkey []byte, err error)

func GeneratePrivateKey

func GeneratePrivateKey() (string, error)

func GenerateRawPrivateKey

func GenerateRawPrivateKey(r io.Reader, signalg string) (sk interface{}, err error)

func InitDial

func InitDial(network, addr string) (conn net.Conn, keydigest []byte, err error)

func InitDialWithDialer

func InitDialWithDialer(dialer *net.Dialer, network, addr string) (conn net.Conn, keydigest []byte, err error)

func LoadKeyFromFile

func LoadKeyFromFile(filename string) (string, error)

LoadKey loads private key from a file in base64-encoded form

func MarshalPrivateKeyToPEM

func MarshalPrivateKeyToPEM(sk interface{}) (*pem.Block, error)

func PublicKey

func PublicKey(skstr string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL