From 2a90a6ccd9d11d55d37f006f3ecb5058e66bd823 Mon Sep 17 00:00:00 2001 From: David Blacka Date: Sat, 26 May 2012 14:42:44 -0400 Subject: [PATCH] byte -> int for NSEC3 digest type. --- src/com/verisignlabs/dnssec/security/ProtoNSEC3.java | 8 ++++---- src/com/verisignlabs/dnssec/security/SignUtils.java | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/com/verisignlabs/dnssec/security/ProtoNSEC3.java b/src/com/verisignlabs/dnssec/security/ProtoNSEC3.java index c6742a4..a65a1ee 100644 --- a/src/com/verisignlabs/dnssec/security/ProtoNSEC3.java +++ b/src/com/verisignlabs/dnssec/security/ProtoNSEC3.java @@ -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; } diff --git a/src/com/verisignlabs/dnssec/security/SignUtils.java b/src/com/verisignlabs/dnssec/security/SignUtils.java index e3fc1d1..e1f9b9f 100644 --- a/src/com/verisignlabs/dnssec/security/SignUtils.java +++ b/src/com/verisignlabs/dnssec/security/SignUtils.java @@ -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;