byte -> int for NSEC3 digest type.
This commit is contained in:
parent
b18a96cbfc
commit
2a90a6ccd9
@ -45,7 +45,7 @@ import org.xbill.DNS.utils.base32;
|
||||
public class ProtoNSEC3
|
||||
{
|
||||
private Name originalOwner;
|
||||
private byte hashAlg;
|
||||
private int hashAlg;
|
||||
private byte flags;
|
||||
private int iterations;
|
||||
private byte[] salt;
|
||||
@ -63,7 +63,7 @@ public class ProtoNSEC3
|
||||
* Creates an NSEC3 Record from the given data.
|
||||
*/
|
||||
public ProtoNSEC3(byte[] owner, Name originalOwner, Name zone, int dclass, long ttl,
|
||||
byte hashAlg, byte flags, int iterations, byte[] salt, byte[] next,
|
||||
int hashAlg, byte flags, int iterations, byte[] salt, byte[] next,
|
||||
TypeMap typemap)
|
||||
{
|
||||
this.zone = zone;
|
||||
@ -80,7 +80,7 @@ public class ProtoNSEC3
|
||||
}
|
||||
|
||||
public ProtoNSEC3(byte[] owner, Name originalOwner, Name zone, int dclass, long ttl,
|
||||
byte hashAlg, byte flags, int iterations, byte[] salt, byte[] next,
|
||||
int hashAlg, byte flags, int iterations, byte[] salt, byte[] next,
|
||||
int[] types)
|
||||
{
|
||||
this(owner, originalOwner, zone, dclass, ttl, hashAlg, flags, iterations, salt, next,
|
||||
@ -168,7 +168,7 @@ public class ProtoNSEC3
|
||||
return dclass;
|
||||
}
|
||||
|
||||
public byte getHashAlgorithm()
|
||||
public int getHashAlgorithm()
|
||||
{
|
||||
return hashAlg;
|
||||
}
|
||||
|
@ -1040,7 +1040,7 @@ public class SignUtils
|
||||
{
|
||||
byte[] hash = nsec3hash(name, NSEC3Record.SHA1_DIGEST_ID, iterations, salt);
|
||||
byte flags = (byte) (optIn ? 0x01 : 0x00);
|
||||
|
||||
|
||||
ProtoNSEC3 r = new ProtoNSEC3(hash, name, zonename, DClass.IN, ttl,
|
||||
NSEC3Record.SHA1_DIGEST_ID, flags, iterations, salt,
|
||||
null, types);
|
||||
@ -1430,7 +1430,7 @@ public class SignUtils
|
||||
* @throws NoSuchAlgorithmException
|
||||
* If the hash algorithm is unrecognized.
|
||||
*/
|
||||
public static byte[] nsec3hash(Name n, byte hash_algorithm, int iterations, byte[] salt)
|
||||
public static byte[] nsec3hash(Name n, int hash_algorithm, int iterations, byte[] salt)
|
||||
throws NoSuchAlgorithmException
|
||||
{
|
||||
MessageDigest md;
|
||||
|
Loading…
Reference in New Issue
Block a user