mirror of
https://github.com/google/nomulus
synced 2026-07-29 11:32:48 +00:00
Add DnsWriter for Cloud DNS
The plumbing to support different DnsWriter implementations per TLD using DI will come in a later CL. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=129375856
This commit is contained in:
committed by
Justine Tunney
parent
51bdb26e7d
commit
0e4244a03d
@@ -17,6 +17,7 @@ package google.registry.model.domain.secdns;
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.googlecode.objectify.annotation.Embed;
|
||||
import google.registry.model.ImmutableObject;
|
||||
import javax.xml.bind.DatatypeConverter;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.adapters.HexBinaryAdapter;
|
||||
@@ -90,4 +91,15 @@ public class DelegationSignerData
|
||||
public int compareTo(DelegationSignerData other) {
|
||||
return Integer.compare(getKeyTag(), other.getKeyTag());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the presentation format of this DS record.
|
||||
*
|
||||
* @see <a href="https://tools.ietf.org/html/rfc4034#section-5.3">RFC 4034 Section 5.3</a>
|
||||
*/
|
||||
public String toRrData() {
|
||||
return String.format(
|
||||
"%d %d %d %s",
|
||||
this.keyTag, this.algorithm, this.digestType, DatatypeConverter.printHexBinary(digest));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user