Simplify TKEY presentation format (#856)
* Simplify TKEY presentation format Just put add ";" in front of it, instead of the whole pseudo option text. Fixes #855 Signed-off-by: Miek Gieben <miek@miek.nl> * Add more fields to presentation format - convert time using the RRSIG routines Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
parent
870a59089c
commit
450ab7d57f
14
types.go
14
types.go
|
@ -1050,10 +1050,16 @@ type TKEY struct {
|
|||
|
||||
// TKEY has no official presentation format, but this will suffice.
|
||||
func (rr *TKEY) String() string {
|
||||
s := "\n;; TKEY PSEUDOSECTION:\n"
|
||||
s += rr.Hdr.String() + " " + rr.Algorithm + " " +
|
||||
strconv.Itoa(int(rr.KeySize)) + " " + rr.Key + " " +
|
||||
strconv.Itoa(int(rr.OtherLen)) + " " + rr.OtherData
|
||||
s := ";" + rr.Hdr.String() +
|
||||
" " + rr.Algorithm +
|
||||
" " + TimeToString(rr.Inception) +
|
||||
" " + TimeToString(rr.Expiration) +
|
||||
" " + strconv.Itoa(int(rr.Mode)) +
|
||||
" " + strconv.Itoa(int(rr.Error)) +
|
||||
" " + strconv.Itoa(int(rr.KeySize)) +
|
||||
" " + rr.Key +
|
||||
" " + strconv.Itoa(int(rr.OtherLen)) +
|
||||
" " + rr.OtherData
|
||||
return s
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue