mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2026-02-02 15:08:59 +08:00
NETCUP: add TLSA support (#3802)
This commit is contained in:
parent
b7c4cac759
commit
6ef0648778
3 changed files with 12 additions and 2 deletions
|
|
@ -286,7 +286,7 @@ Jump to a table:
|
|||
| [`LUADNS`](luadns.md) | ✅ | ✅ | ❔ | ✅ | ✅ |
|
||||
| [`MYTHICBEASTS`](mythicbeasts.md) | ✅ | ❔ | ❔ | ✅ | ✅ |
|
||||
| [`NAMECHEAP`](namecheap.md) | ✅ | ❔ | ❔ | ❔ | ❌ |
|
||||
| [`NETCUP`](netcup.md) | ✅ | ❔ | ❔ | ❔ | ❔ |
|
||||
| [`NETCUP`](netcup.md) | ✅ | ❔ | ❔ | ❔ | ✅ |
|
||||
| [`NETLIFY`](netlify.md) | ✅ | ❔ | ❔ | ❌ | ❌ |
|
||||
| [`NS1`](ns1.md) | ✅ | ✅ | ❔ | ❔ | ✅ |
|
||||
| [`ORACLE`](oracle.md) | ✅ | ❔ | ❔ | ✅ | ✅ |
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ var features = providers.DocumentationNotes{
|
|||
providers.CanUseLOC: providers.Cannot(),
|
||||
providers.CanUsePTR: providers.Cannot(),
|
||||
providers.CanUseSRV: providers.Can(),
|
||||
providers.CanUseTLSA: providers.Can(),
|
||||
providers.DocCreateDomains: providers.Cannot(),
|
||||
providers.DocDualHost: providers.Cannot(),
|
||||
providers.DocOfficiallySupported: providers.Cannot(),
|
||||
|
|
|
|||
|
|
@ -110,6 +110,15 @@ func toRecordConfig(domain string, r *record) *models.RecordConfig {
|
|||
rc.CaaFlag = uint8(caaFlag)
|
||||
rc.CaaTag = parts[1]
|
||||
_ = rc.SetTarget(strings.Trim(parts[2], "\""))
|
||||
case "TLSA":
|
||||
parts := strings.Split(r.Destination, " ")
|
||||
tlsaUsage, _ := strconv.ParseUint(parts[0], 10, 8)
|
||||
tlsaSelector, _ := strconv.ParseUint(parts[1], 10, 8)
|
||||
tlsaMatchingType, _ := strconv.ParseUint(parts[2], 10, 8)
|
||||
rc.TlsaUsage = uint8(tlsaUsage)
|
||||
rc.TlsaSelector = uint8(tlsaSelector)
|
||||
rc.TlsaMatchingType = uint8(tlsaMatchingType)
|
||||
_ = rc.SetTarget(parts[3])
|
||||
default:
|
||||
_ = rc.SetTarget(r.Destination)
|
||||
}
|
||||
|
|
@ -142,7 +151,7 @@ func fromRecordConfig(in *models.RecordConfig) *record {
|
|||
case "SSHFP":
|
||||
rc.Destination = strconv.Itoa(int(in.SshfpAlgorithm)) + " " + strconv.Itoa(int(in.SshfpFingerprint))
|
||||
case "TLSA":
|
||||
rc.Destination = strconv.Itoa(int(in.TlsaUsage)) + " " + strconv.Itoa(int(in.TlsaSelector)) + " " + strconv.Itoa(int(in.TlsaMatchingType))
|
||||
rc.Destination = strconv.Itoa(int(in.TlsaUsage)) + " " + strconv.Itoa(int(in.TlsaSelector)) + " " + strconv.Itoa(int(in.TlsaMatchingType)) + " " + in.GetTargetField()
|
||||
default:
|
||||
msg := fmt.Sprintf("ClouDNS.toReq rtype %v unimplemented", rc.Type)
|
||||
panic(msg)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue