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
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
Click to show internal directories.
Click to hide internal directories.