From b634118257a62eef4e6a3697e5bd36b11fd71758 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Sat, 25 Dec 2010 13:13:32 +0100 Subject: [PATCH] add function prototype for to be implemented functions --- dnssec.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dnssec.go b/dnssec.go index 173c9f4c..d73c1bc4 100644 --- a/dnssec.go +++ b/dnssec.go @@ -6,6 +6,7 @@ import ( ) const ( + // RFC1982 serial arithmetic year68 = 2 << (32 - 1) ) @@ -21,7 +22,7 @@ func timeToDate(t uint32) string { } // Using RFC1982 calculate if a signature is valid -func validSignaturePeriod(start, end uint32) bool { +func ValidSignaturePeriod(start, end uint32) bool { utc := time.UTC().Seconds() // maybe as parameter?? TODO MG return int64(start) <= utc && utc <= int64(end) } @@ -38,6 +39,13 @@ func KeyToDS(k *RR_DNSKEY, hash int) *RR_DS { return nil } +// Validate an rrset with the signature and key. Note the +// signature validate period is NOT checked. Used +// ValidSignaturePeriod for that +func Valid(rrset []RR, signature *RR_RRSIG, key *RR_DNSKEY) bool { + +} + // Calculate the keytag of the DNSKEY func KeyTag(k *RR_DNSKEY) int { return 0