Documentation ¶
Index ¶
- func ConfirmFingerprint(pk *ecdsa.PublicKey, enforceSignatureVerify bool) (confirmed *ecdsa.PublicKey, err error)
- func GetECDSAPublicKeyFromBytes(publicKey []byte) (*ecdsa.PublicKey, error)
- func PreparePublicKey(key string) []byte
- func PrepareSignatureParams(signingPubKeyString, signingPubKeyFile string) (*ecdsa.PublicKey, bool, error)
- func UnmarshalKey(publicKey []byte) *ecdsa.PublicKey
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 ¶
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 ¶
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 ¶
UnmarshalKey unmarshal an ecdsa public key contained in immudb status signature
Types ¶
This section is empty.