Package org.xbill.DNS
Class SIGRecord
java.lang.Object
org.xbill.DNS.Record
org.xbill.DNS.SIGRecord
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<Record>
Signature - A SIG provides the digital signature of an RRset, so that the data can be
authenticated by a DNSSEC-capable resolver. The signature is usually generated by a key contained
in a KEYRecord
- Author:
- Brian Wellington
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSIGRecord
(Name name, int dclass, long ttl, int covered, int alg, long origttl, Instant expire, Instant timeSigned, int footprint, Name signer, byte[] signature) Creates an SIG Record from the given dataSIGRecord
(Name name, int dclass, long ttl, int covered, int alg, long origttl, Date expire, Date timeSigned, int footprint, Name signer, byte[] signature) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the cryptographic algorithm of the key that generated the signatureReturns the time at which the signature expiresint
Returns the footprint/key id of the signing key.int
Returns the number of labels in the signed domain name.long
Returns the original TTL of the RRsetint
Returns the type of RRset that this record would belong to.byte[]
Returns the binary data representing the signatureReturns the owner of the signing keyReturns the time at which this signature was generatedint
Returns the RRset type covered by this signatureprotected void
rdataFromString
(Tokenizer st, Name origin) Converts the text format of an RR to the internal format - must be overridenprotected void
rrFromWire
(DNSInput in) Converts the type-specific RR to wire format - must be overriddenprotected String
Converts the RRSIG/SIG Record to a Stringprotected void
rrToWire
(DNSOutput out, Compression c, boolean canonical) Converts the type-specific RR to wire format - must be overridden.Methods inherited from class org.xbill.DNS.Record
byteArrayFromString, byteArrayToString, compareTo, equals, fromString, fromString, fromWire, getAdditionalName, getDClass, getName, getTTL, getType, hashCode, newRecord, newRecord, newRecord, newRecord, rdataToString, rdataToWireCanonical, sameRRset, sameRRset, toString, toWire, toWireCanonical, unknownToString, withName
-
Field Details
-
covered
protected int covered -
alg
protected int alg -
labels
protected int labels -
origttl
protected long origttl -
expire
-
timeSigned
-
footprint
protected int footprint -
signer
-
signature
protected byte[] signature
-
-
Constructor Details
-
SIGRecord
public SIGRecord(Name name, int dclass, long ttl, int covered, int alg, long origttl, Instant expire, Instant timeSigned, int footprint, Name signer, byte[] signature) Creates an SIG Record from the given data- Parameters:
covered
- The RRset type covered by this signaturealg
- The cryptographic algorithm of the key that generated the signatureorigttl
- The original TTL of the RRsetexpire
- The time at which the signature expirestimeSigned
- The time at which this signature was generatedfootprint
- The footprint/key id of the signing key.signer
- The owner of the signing keysignature
- Binary data representing the signature
-
SIGRecord
@Deprecated public SIGRecord(Name name, int dclass, long ttl, int covered, int alg, long origttl, Date expire, Date timeSigned, int footprint, Name signer, byte[] signature) Creates an SIG Record from the given data- Parameters:
covered
- The RRset type covered by this signaturealg
- The cryptographic algorithm of the key that generated the signatureorigttl
- The original TTL of the RRsetexpire
- The time at which the signature expirestimeSigned
- The time at which this signature was generatedfootprint
- The footprint/key id of the signing key.signer
- The owner of the signing keysignature
- Binary data representing the signature
-
-
Method Details
-
rrFromWire
Description copied from class:Record
Converts the type-specific RR to wire format - must be overridden- Specified by:
rrFromWire
in classRecord
- Throws:
IOException
-
rdataFromString
Description copied from class:Record
Converts the text format of an RR to the internal format - must be overriden- Specified by:
rdataFromString
in classRecord
- Throws:
IOException
-
rrToString
Converts the RRSIG/SIG Record to a String- Specified by:
rrToString
in classRecord
-
getTypeCovered
public int getTypeCovered()Returns the RRset type covered by this signature -
getRRsetType
public int getRRsetType()Returns the type of RRset that this record would belong to. For all types except SIG/RRSIG, this is equivalent to getType().- Overrides:
getRRsetType
in classRecord
- Returns:
- The type of record
- See Also:
-
getAlgorithm
public int getAlgorithm()Returns the cryptographic algorithm of the key that generated the signature -
getLabels
public int getLabels()Returns the number of labels in the signed domain name. This may be different than the record's domain name if the record is a wildcard record. -
getOrigTTL
public long getOrigTTL()Returns the original TTL of the RRset -
getExpire
Returns the time at which the signature expires -
getTimeSigned
Returns the time at which this signature was generated -
getFootprint
public int getFootprint()Returns the footprint/key id of the signing key. -
getSigner
Returns the owner of the signing key -
getSignature
public byte[] getSignature()Returns the binary data representing the signature -
rrToWire
Description copied from class:Record
Converts the type-specific RR to wire format - must be overridden.
-
SIGRecord(Name, int, long, int, int, long, Instant, Instant, int, Name, byte[])