mirror of
https://github.com/google/nomulus.git
synced 2025-05-20 19:29:35 +02: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:
parent
51bdb26e7d
commit
0e4244a03d
6 changed files with 481 additions and 0 deletions
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue