1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

Added DS for cloudflare provider with tests

This commit is contained in:
Robert Koch
2019-05-13 11:57:14 +08:00
committed by Tom Limoncelli
parent c0354a585d
commit 2e8589e4ce
3 changed files with 5 additions and 4 deletions

View File

@ -373,11 +373,11 @@ func naptr(name string, order uint16, preference uint16, flags string, service s
return r return r
} }
func ds(name string, keytag uint16, algorithm, digesttype uint8, digest string) *rec { func ds(name string, keyTag uint16, algorithm, digestType uint8, digest string) *rec {
r := makeRec(name, "", "DS") r := makeRec(name, "", "DS")
r.DsKeyTag = keytag r.DsKeyTag = keyTag
r.DsAlgorithm = algorithm r.DsAlgorithm = algorithm
r.DsDigestType = digesttype r.DsDigestType = digestType
r.DsDigest = digest r.DsDigest = digest
return r return r
} }

View File

@ -474,7 +474,7 @@ type cfRecData struct {
Selector uint8 `json:"selector"` // TLSA Selector uint8 `json:"selector"` // TLSA
Matching_Type uint8 `json:"matching_type"` // TLSA Matching_Type uint8 `json:"matching_type"` // TLSA
Certificate string `json:"certificate"` // TLSA Certificate string `json:"certificate"` // TLSA
Algorithm uint8 `json:"algorithm"` // SSHFP/DS Algorithm uint8 `json:"algorithm"` // SSHFP or DS
Hash_Type uint8 `json:"type"` // SSHFP Hash_Type uint8 `json:"type"` // SSHFP
Fingerprint string `json:"fingerprint"` // SSHFP Fingerprint string `json:"fingerprint"` // SSHFP
KeyTag uint16 `json:"key_tag"` // DS KeyTag uint16 `json:"key_tag"` // DS

View File

@ -222,6 +222,7 @@ func (c *CloudflareApi) createRec(rec *models.RecordConfig, domainID string) []*
cf.Name = rec.GetLabelFQDN() cf.Name = rec.GetLabelFQDN()
} else if rec.Type == "DS" { } else if rec.Type == "DS" {
cf.Data = cfDSData(rec) cf.Data = cfDSData(rec)
cf.Content = ""
} }
endpoint := fmt.Sprintf(recordsURL, domainID) endpoint := fmt.Sprintf(recordsURL, domainID)
buf := &bytes.Buffer{} buf := &bytes.Buffer{}