Documentation ¶
Index ¶
- Constants
- func ContainsType(rrset []dns.RR, t uint16) bool
- func DefaultDenyExistenceNSEC(msg *dns.Msg, z *Zone, wildcardsUsed SynthesisedResults) (*dns.Msg, error)
- func DefaultDenyExistenceNSEC3(msg *dns.Msg, z *Zone, wildcardsUsed SynthesisedResults) (*dns.Msg, error)
- func Do(msg *dns.Msg) bool
- func GroupRecordsByNameAndType(rrset []dns.RR) map[string]map[uint16][]dns.RR
- func GroupRecordsByType(rrset []dns.RR) map[uint16][]dns.RR
- func IterateDownDomainHierarchy(domain string) iter.Seq[string]
- func NewHeader(name string, rrtype uint16) dns.RR_Header
- func SignMsg(key *dns.DNSKEY, signer crypto.Signer, msg *dns.Msg, ...) (*dns.Msg, error)
- func SignRRSet(key *dns.DNSKEY, signer crypto.Signer, rrset []dns.RR, ...) (*dns.RRSIG, error)
- func WildcardName(name string) string
- type BehaviourFactory
- type Callbacks
- type GluedNS
- type Logger
- type Nameserver
- func (ns *Nameserver) AddBehaviours(behaviours []BehaviourFactory) error
- func (ns *Nameserver) BaseDelegatedSingers() []*dns.DS
- func (ns *Nameserver) Exchange(qmsg *dns.Msg) (*dns.Msg, error)
- func (ns *Nameserver) RegisterToZone(new *Zone, existing *Zone) error
- func (ns *Nameserver) RegisterZone(new *Zone) error
- func (ns *Nameserver) RootDelegatedSingers() []*dns.DS
- type OldBehaviourFactory
- type RecordSet
- type RecordStore
- type SignRRSetSigner
- type Signer
- type SignerAutogenPair
- type SignerAutogenSingle
- func (s *SignerAutogenSingle) DelegatedSingers() []*dns.DS
- func (s *SignerAutogenSingle) Key() *dns.DNSKEY
- func (s *SignerAutogenSingle) Keys() []*dns.DNSKEY
- func (s *SignerAutogenSingle) SetDnsKeyFlag(flag uint16)
- func (s *SignerAutogenSingle) SetHash(hash uint8)
- func (s *SignerAutogenSingle) Sign(msg *dns.Msg) (*dns.Msg, error)
- func (s *SignerAutogenSingle) Signer() crypto.Signer
- type SignerReaderPair
- type SignerReaderSingle
- func (s *SignerReaderSingle) DelegatedSingers() []*dns.DS
- func (s *SignerReaderSingle) Key() *dns.DNSKEY
- func (s *SignerReaderSingle) Keys() []*dns.DNSKEY
- func (s *SignerReaderSingle) SetDnsKeyFlag(flag uint16)
- func (s *SignerReaderSingle) Sign(msg *dns.Msg) (*dns.Msg, error)
- func (s *SignerReaderSingle) Signer() crypto.Signer
- type SynthesisedResults
- type Zone
- func (z *Zone) AddRecord(r dns.RR)
- func (z *Zone) AddRecords(r []dns.RR)
- func (z *Zone) DelegateTo(child *Zone)
- func (z *Zone) Exchange(qmsg *dns.Msg) (*dns.Msg, error)
- func (z *Zone) GetRecords(rrname string, rrtype uint16) []dns.RR
- func (z *Zone) GetTypesAndRecords(rrname string) map[uint16]RecordSet
Constants ¶
View Source
const ( Nsec3Salt = "abcdef" Nsec3Iterations = uint16(2) )
View Source
const ( DnskeyFlagZsk uint16 = 256 // Zone Signing Key DnskeyFlagKsk uint16 = 257 // Key Signing Key DnskeyFlagCsk uint16 = 257 // Key Signing Key )
Variables ¶
This section is empty.
Functions ¶
func WildcardName ¶
WildcardName replaces the first label with *
Types ¶
type BehaviourFactory ¶
type BehaviourFactory interface {
Setup(*Nameserver) []*Zone
}
type Callbacks ¶
type Callbacks struct { // Message signing Keys func() []*dns.DNSKEY Sign func(*dns.Msg) (*dns.Msg, error) DelegatedSingers func() []*dns.DS DenyExistence func(*dns.Msg, *Zone, SynthesisedResults) (*dns.Msg, error) }
func NewStandardCallbacks ¶
type Nameserver ¶
type Nameserver struct { RootZone *Zone BaseZone *Zone BaseZoneName string NSRecords []GluedNS Zones map[string]*Zone }
func NewNameserver ¶
func NewNameserver(baseZoneName string, nsIPv4s []string) *Nameserver
func (*Nameserver) AddBehaviours ¶
func (ns *Nameserver) AddBehaviours(behaviours []BehaviourFactory) error
func (*Nameserver) BaseDelegatedSingers ¶
func (ns *Nameserver) BaseDelegatedSingers() []*dns.DS
func (*Nameserver) RegisterToZone ¶
func (ns *Nameserver) RegisterToZone(new *Zone, existing *Zone) error
func (*Nameserver) RegisterZone ¶
func (ns *Nameserver) RegisterZone(new *Zone) error
func (*Nameserver) RootDelegatedSingers ¶
func (ns *Nameserver) RootDelegatedSingers() []*dns.DS
type OldBehaviourFactory ¶
type OldBehaviourFactory interface {
Setup(*Nameserver) error
}
type RecordStore ¶
func (RecordStore) GetNSEC3ClosestEncloserRecord ¶
func (store RecordStore) GetNSEC3ClosestEncloserRecord(name, zoneName string) dns.RR
func (RecordStore) GetNSEC3Record ¶
func (store RecordStore) GetNSEC3Record(name, zoneName string) dns.RR
type SignRRSetSigner ¶
type SignerAutogenPair ¶
type SignerAutogenPair struct { Ksk *SignerAutogenSingle Zsk *SignerAutogenSingle // contains filtered or unexported fields }
func NewSignerAutogenPair ¶
func (*SignerAutogenPair) DelegatedSingers ¶
func (s *SignerAutogenPair) DelegatedSingers() []*dns.DS
func (*SignerAutogenPair) Keys ¶
func (s *SignerAutogenPair) Keys() []*dns.DNSKEY
type SignerAutogenSingle ¶
type SignerAutogenSingle struct {
// contains filtered or unexported fields
}
SignerAutogenSingle Generates a CSK signer using the passed algorithm and bit count.
func NewSignerAutogenSingle ¶
func NewSignerAutogenSingle(zone string, algorithm uint8, bits int) (*SignerAutogenSingle, error)
func NewSignerAutogenSingleDefault ¶
func NewSignerAutogenSingleDefault(zone string) *SignerAutogenSingle
NewSignerAutogenSingleDefault Creates the default config - a ECDSAP256SHA256 CSK
func NewSignerAutogenSingleMLDSA ¶
func NewSignerAutogenSingleMLDSA(zone string, algorithm uint8) (*SignerAutogenSingle, error)
func (*SignerAutogenSingle) DelegatedSingers ¶
func (s *SignerAutogenSingle) DelegatedSingers() []*dns.DS
func (*SignerAutogenSingle) Key ¶
func (s *SignerAutogenSingle) Key() *dns.DNSKEY
func (*SignerAutogenSingle) Keys ¶
func (s *SignerAutogenSingle) Keys() []*dns.DNSKEY
func (*SignerAutogenSingle) SetDnsKeyFlag ¶
func (s *SignerAutogenSingle) SetDnsKeyFlag(flag uint16)
func (*SignerAutogenSingle) SetHash ¶
func (s *SignerAutogenSingle) SetHash(hash uint8)
func (*SignerAutogenSingle) Signer ¶
func (s *SignerAutogenSingle) Signer() crypto.Signer
type SignerReaderPair ¶
type SignerReaderPair struct { Ksk *SignerReaderSingle Zsk *SignerAutogenSingle // contains filtered or unexported fields }
func NewSignerReaderPair ¶
func NewSignerReaderPair(zone string, publicReader, secretReader io.Reader) (*SignerReaderPair, error)
func (*SignerReaderPair) DelegatedSingers ¶
func (s *SignerReaderPair) DelegatedSingers() []*dns.DS
func (*SignerReaderPair) Keys ¶
func (s *SignerReaderPair) Keys() []*dns.DNSKEY
type SignerReaderSingle ¶
type SignerReaderSingle struct {
// contains filtered or unexported fields
}
SignerReaderSingle Generates a CSK signer using the passed algorithm and bit count.
func NewSignerReaderSingle ¶
func NewSignerReaderSingle(zone string, publicReader, secretReader io.Reader) (*SignerReaderSingle, error)
func (*SignerReaderSingle) DelegatedSingers ¶
func (s *SignerReaderSingle) DelegatedSingers() []*dns.DS
func (*SignerReaderSingle) Key ¶
func (s *SignerReaderSingle) Key() *dns.DNSKEY
func (*SignerReaderSingle) Keys ¶
func (s *SignerReaderSingle) Keys() []*dns.DNSKEY
func (*SignerReaderSingle) SetDnsKeyFlag ¶
func (s *SignerReaderSingle) SetDnsKeyFlag(flag uint16)
SetDnsKeyFlag allows the DNSKEY flags to be amended.
func (*SignerReaderSingle) Signer ¶
func (s *SignerReaderSingle) Signer() crypto.Signer
type SynthesisedResults ¶
type Zone ¶
type Zone struct { Name string Callbacks *Callbacks NS []GluedNS SOA *dns.SOA // a map of name, then type Records RecordStore }
func (*Zone) AddRecords ¶
func (*Zone) DelegateTo ¶
Click to show internal directories.
Click to hide internal directories.