Documentation ¶
Index ¶
- func CheckSectionSignatures(s section.WithSig, pkeys map[keys.PublicKeyID][]keys.PublicKey, ...) bool
- func CheckSignatureNotExpired(s section.WithSig) bool
- func CheckStringFields(s section.Section) bool
- func SignSectionUnsafe(s section.WithSig, ks map[keys.PublicKeyID]interface{}) error
- func ValidSectionAndSignature(s section.WithSig) bool
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 ¶
CheckSignatureNotExpired returns true if s is nil or all the signatures ValidUntil are in the future
func CheckStringFields ¶
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 ¶
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.