Fix tsig 48 bits timer
This commit is contained in:
parent
e1873c28bc
commit
9cbe439ce3
7
tsig.go
7
tsig.go
|
@ -329,3 +329,10 @@ func stripTsig(msg []byte) ([]byte, *RR_TSIG, error) {
|
|||
}
|
||||
return msg[:tsigoff], rr, nil
|
||||
}
|
||||
|
||||
// Translate the TSIG time signed into a date. There is no
|
||||
// need for RFC1982 calculations as this date is 48 bits.
|
||||
func tsigTimeToDate(t uint64) string {
|
||||
ti := time.Unix(int64(t), 0).UTC()
|
||||
return ti.Format("20060102150405")
|
||||
}
|
||||
|
|
11
types.go
11
types.go
|
@ -1055,17 +1055,6 @@ func dateToTime(s string) (uint32, error) {
|
|||
return ti, nil
|
||||
}
|
||||
|
||||
// Translate the TSIG time signed into a date. There is no
|
||||
// need for RFC1982 calculations as this date is 48 bits
|
||||
func tsigTimeToDate(t uint64) string {
|
||||
// only use the lower 48 bits, TODO(mg), check for 48 bit size
|
||||
return "TODO"
|
||||
/*
|
||||
ti := time.Unix(int64(t), 0).Unix()
|
||||
return ti.Format("20060102150405")
|
||||
*/
|
||||
}
|
||||
|
||||
// saltString converts a NSECX salt to uppercase and
|
||||
// returns "-" when it is empty
|
||||
func saltString(s string) string {
|
||||
|
|
Loading…
Reference in New Issue