siglib

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckSectionSignatures

func CheckSectionSignatures(s section.WithSig, pkeys map[keys.PublicKeyID][]keys.PublicKey,
	maxVal util.MaxCacheValidity) bool

CheckSectionSignatures verifies all signatures on s and its content. It assumes that s is sorted. Expired signatures are removed. Returns true if all non expired signatures are correct.

func CheckSignatureNotExpired

func CheckSignatureNotExpired(s section.WithSig) bool

CheckSignatureNotExpired returns true if s is nil or all the signatures ValidUntil are in the future

func CheckStringFields

func CheckStringFields(s section.Section) bool

CheckStringFields returns true if non of the string fields of the given section contain a zone file type marker. It panics if the interface s contains a type but the interfaces value is nil

func SignSectionUnsafe

func SignSectionUnsafe(s section.WithSig, ks map[keys.PublicKeyID]interface{}) error

SignSectionUnsafe signs a section and all contained assertions with the given private Key and adds the resulting bytestring to the given signatures. s must be sorted. It does not check the validity of s or sig. Returns false if the signature was not added to the section.

func ValidSectionAndSignature

func ValidSectionAndSignature(s section.WithSig) bool

ValidSectionAndSignature returns true if the section is not nil, all the signatures ValidUntil are in the future, the string fields do not contain <whitespace>:<non whitespace>:<whitespace>, and the section's content is sorted (by sorting it).

Types

This section is empty.

Jump to

Keyboard shortcuts

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