public class KEYRecord extends Record
DNSSEC
,
DNSKEYRecord
,
RFC 2535: Domain Name System Security
Extensions,
RFC 3755: Legacy Resolver Compatibility for
Delegation Signer (DS),
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
KEYRecord.Flags
KEY flags identifiers.
|
static class |
KEYRecord.Protocol
KEY protocol identifiers.
|
Modifier and Type | Field and Description |
---|---|
protected int |
alg |
static int |
FLAG_NOAUTH
This key cannot be used for authentication
|
static int |
FLAG_NOCONF
This key cannot be used for confidentiality (encryption)
|
static int |
FLAG_NOKEY
This key cannot be used for authentication or confidentiality
|
protected int |
flags |
protected int |
footprint |
protected byte[] |
key |
static int |
OWNER_HOST
A host/end entity key
|
static int |
OWNER_USER
A user key
|
static int |
OWNER_ZONE
A zone key
|
protected int |
proto |
static int |
PROTOCOL_ANY
Key was created for use with any protocol
|
static int |
PROTOCOL_DNSSEC
Key was created for use with DNSSEC
|
static int |
PROTOCOL_EMAIL
Key was created for use with email
|
static int |
PROTOCOL_IPSEC
Key was created for use with IPSEC
|
static int |
PROTOCOL_TLS
Key was created for use with transaction level security
|
protected PublicKey |
publicKey |
Constructor and Description |
---|
KEYRecord(Name name,
int dclass,
long ttl,
int flags,
int proto,
int alg,
byte[] key)
Creates a KEY Record from the given data
|
KEYRecord(Name name,
int dclass,
long ttl,
int flags,
int proto,
int alg,
PublicKey key)
Creates a KEY Record from the given data
|
Modifier and Type | Method and Description |
---|---|
int |
getAlgorithm()
Returns the key's algorithm
|
int |
getFlags()
Returns the flags describing the key's properties
|
int |
getFootprint()
Returns the key's footprint (after computing it)
|
byte[] |
getKey()
Returns the binary data representing the key
|
int |
getProtocol()
Returns the protocol that the key was created for
|
PublicKey |
getPublicKey()
Returns a PublicKey corresponding to the data in this key.
|
protected void |
rdataFromString(Tokenizer st,
Name origin)
Converts the text format of an RR to the internal format - must be overriden
|
protected void |
rrFromWire(DNSInput in)
Converts the type-specific RR to wire format - must be overridden
|
protected String |
rrToString()
Converts the DNSKEY/KEY Record to a String
|
protected void |
rrToWire(DNSOutput out,
Compression c,
boolean canonical)
Converts the type-specific RR to wire format - must be overridden.
|
byteArrayFromString, byteArrayToString, compareTo, equals, fromString, fromString, fromWire, getAdditionalName, getDClass, getName, getRRsetType, getTTL, getType, hashCode, newRecord, newRecord, newRecord, newRecord, rdataToString, rdataToWireCanonical, sameRRset, toString, toWire, toWireCanonical, unknownToString, withName
public static final int FLAG_NOCONF
public static final int FLAG_NOAUTH
public static final int FLAG_NOKEY
public static final int OWNER_ZONE
public static final int OWNER_HOST
public static final int OWNER_USER
public static final int PROTOCOL_TLS
public static final int PROTOCOL_EMAIL
public static final int PROTOCOL_DNSSEC
public static final int PROTOCOL_IPSEC
public static final int PROTOCOL_ANY
protected int flags
protected int proto
protected int alg
protected byte[] key
protected int footprint
protected PublicKey publicKey
public KEYRecord(Name name, int dclass, long ttl, int flags, int proto, int alg, byte[] key)
flags
- Flags describing the key's propertiesproto
- The protocol that the key was created foralg
- The key's algorithmkey
- Binary data representing the keypublic KEYRecord(Name name, int dclass, long ttl, int flags, int proto, int alg, PublicKey key) throws DNSSEC.DNSSECException
flags
- Flags describing the key's propertiesproto
- The protocol that the key was created foralg
- The key's algorithmkey
- The key as a PublicKeyDNSSEC.DNSSECException
- The PublicKey could not be converted into DNS format.protected void rdataFromString(Tokenizer st, Name origin) throws IOException
Record
rdataFromString
in class Record
IOException
protected void rrFromWire(DNSInput in) throws IOException
Record
rrFromWire
in class Record
IOException
protected String rrToString()
rrToString
in class Record
public int getFlags()
public int getProtocol()
public int getAlgorithm()
public byte[] getKey()
public int getFootprint()
public PublicKey getPublicKey() throws DNSSEC.DNSSECException
DNSSEC.DNSSECException
- The key could not be converted.protected void rrToWire(DNSOutput out, Compression c, boolean canonical)
Record
Copyright © 2022 dnsjava.org. All rights reserved.