mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
NEW RECORD TYPE: DNSKEY (#2917)
Signed-off-by: xtex <xtexchooser@duck.com>
This commit is contained in:
@ -522,6 +522,12 @@ func ds(name string, keyTag uint16, algorithm, digestType uint8, digest string)
|
||||
return r
|
||||
}
|
||||
|
||||
func dnskey(name string, flags uint16, protocol, algorithm uint8, publicKey string) *models.RecordConfig {
|
||||
r := makeRec(name, "", "DNSKEY")
|
||||
r.SetTargetDNSKEY(flags, protocol, algorithm, publicKey)
|
||||
return r
|
||||
}
|
||||
|
||||
func ignoreName(labelSpec string) *models.RecordConfig {
|
||||
return ignore(labelSpec, "*", "*")
|
||||
}
|
||||
@ -1612,6 +1618,14 @@ func makeTests() []*TestGroup {
|
||||
tc("Create DNAME record in non-FQDN", dname("a", "b")),
|
||||
),
|
||||
|
||||
testgroup("DNSKEY",
|
||||
requires(providers.CanUseDNSKEY),
|
||||
tc("Create DNSKEY record", dnskey("test", 257, 3, 13, "fRnjbeUVyKvz1bDx2lPmu3KY1k64T358t8kP6Hjveos=")),
|
||||
tc("Modify DNSKEY record 1", dnskey("test", 256, 3, 13, "fRnjbeUVyKvz1bDx2lPmu3KY1k64T358t8kP6Hjveos=")),
|
||||
tc("Modify DNSKEY record 2", dnskey("test", 256, 3, 13, "whjtMiJP9C86l0oTJUxemuYtQ0RIZePWt6QETC2kkKM=")),
|
||||
tc("Modify DNSKEY record 3", dnskey("test", 256, 3, 15, "whjtMiJP9C86l0oTJUxemuYtQ0RIZePWt6QETC2kkKM=")),
|
||||
),
|
||||
|
||||
//// Vendor-specific record types
|
||||
|
||||
// Narrative: DNSControl supports DNS records that don't exist!
|
||||
|
Reference in New Issue
Block a user