Not possible to create keytag from privkey alone

This commit is contained in:
Miek Gieben 2011-01-18 11:43:08 +01:00
parent 68e0e0b1be
commit fc0ffa20f7
1 changed files with 1 additions and 3 deletions

View File

@ -156,11 +156,9 @@ func (s *RR_RRSIG) Sign(k PrivateKey, rrset RRset) bool {
return false
}
// s.Inception and s.Expiration may be 0 (rollover etc.)
// the rest must be set
if s.KeyTag == 0 || len(s.SignerName) == 0 || s.Algorithm == 0 {
// Must be set
return false
}
s.Hdr.Rrtype = TypeRRSIG
s.Hdr.Name = rrset[0].Header().Name
s.Hdr.Class = rrset[0].Header().Class