signature

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfirmFingerprint

func ConfirmFingerprint(pk *ecdsa.PublicKey, enforceSignatureVerify bool) (confirmed *ecdsa.PublicKey, err error)

ConfirmFingerprint Checks if the public key pk is equal to an already previously confirmed (local) key. If a local public key not exists cas automatically trust the provided key, except enforceSignatureVerify is true, in that case cas will require explicit acceptation of the signature that came from server.

func GetECDSAPublicKeyFromBytes

func GetECDSAPublicKeyFromBytes(publicKey []byte) (*ecdsa.PublicKey, error)

GetECDSAPublicKeyFromBytes parses bytes content in order to have an ecdsa public key. A valid trailer and header is needed here. Use PreparePublicKey in case of need.

func PreparePublicKey

func PreparePublicKey(key string) []byte

PreparePublicKey append and prepend public key header and footer on a public key content

func PrepareSignatureParams

func PrepareSignatureParams(signingPubKeyString, signingPubKeyFile string) (*ecdsa.PublicKey, bool, error)

PrepareSignatureParams returns signing public keys from an environment var (string) or local file on file system. When public key is specified it disables signature comparison with the local public key previously trusted. If no external public key is explicit provided it try to the local public key, if present.

func UnmarshalKey

func UnmarshalKey(publicKey []byte) *ecdsa.PublicKey

UnmarshalKey unmarshal an ecdsa public key contained in immudb status signature

Types

This section is empty.

Jump to

Keyboard shortcuts

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