certificate

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreKeysTheSame added in v0.6.2

func AreKeysTheSame(privateKey *ecdsa.PrivateKey, certPubKey string) error

Types

type BootstrapNode added in v0.6.2

type BootstrapNode struct {
	PublicKey string `json:"public_key"`
	Host      string `json:"host"`
}

BootstrapNode holds info about bootstrap nodes

type Certificate

type Certificate struct {
	MajorityRule   int             `json:"majority_rule"`
	PublicKey      string          `json:"public_key"`
	Reference      string          `json:"reference"`
	Roles          []string        `json:"roles"`
	BootstrapNodes []BootstrapNode `json:"bootstrap_nodes"`
	// contains filtered or unexported fields
}

Certificate holds info about certificate

func NewCertificate

func NewCertificate(keysPath string, certPath string) (*Certificate, error)

NewCertificate constructor creates new Certificate component

func NewCertificatesWithKeys added in v0.6.2

func NewCertificatesWithKeys(keysPath string) (*Certificate, error)

NewCertificatesWithKeys generate certificate from given keys

func (*Certificate) Dump

func (cert *Certificate) Dump() (string, error)

func (*Certificate) GenerateKeys

func (cert *Certificate) GenerateKeys() error

GenerateKeys generates certificate keys

func (*Certificate) GetEcdsaPrivateKey

func (cert *Certificate) GetEcdsaPrivateKey() *ecdsa.PrivateKey

GetEcdsaPrivateKey returns private key in ecdsa format

func (*Certificate) GetPrivateKey

func (cert *Certificate) GetPrivateKey() (string, error)

GetPrivateKey returns private key as string

func (*Certificate) GetPublicKey

func (cert *Certificate) GetPublicKey() (string, error)

GetPublicKey returns public key as string

Jump to

Keyboard shortcuts

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