move into the com.verisign.tat package (leaving unbound behind. sniff.)

This commit is contained in:
David Blacka 2009-04-19 15:27:02 -04:00
parent ac3dbc68e0
commit a852ce1790
10 changed files with 40 additions and 16 deletions

View File

@ -26,7 +26,7 @@
*
*/
package se.rfc.unbound;
package com.versign.tat.dnssec;
import java.io.IOException;
import java.util.*;

View File

@ -28,7 +28,7 @@
*
*/
package se.rfc.unbound;
package com.versign.tat.dnssec;
import java.util.*;
import java.io.*;
@ -37,8 +37,9 @@ import java.security.*;
import org.xbill.DNS.*;
import org.xbill.DNS.security.*;
import se.rfc.unbound.SecurityStatus;
import se.rfc.unbound.Util;
import com.versign.tat.dnssec.SecurityStatus;
import com.versign.tat.dnssec.Util;
/**
* A class for performing basic DNSSEC verification. The DNSJAVA package

View File

@ -27,7 +27,7 @@
*
*/
package se.rfc.unbound;
package com.versign.tat.dnssec;
import java.security.NoSuchAlgorithmException;
import java.util.*;
@ -35,7 +35,8 @@ import java.util.*;
import org.xbill.DNS.*;
import org.xbill.DNS.utils.base32;
import se.rfc.unbound.SignUtils.ByteArrayComparator;
import com.versign.tat.dnssec.SignUtils.ByteArrayComparator;
public class NSEC3ValUtils

View File

@ -27,7 +27,7 @@
*
*/
package se.rfc.unbound;
package com.versign.tat.dnssec;
import java.util.*;

View File

@ -25,7 +25,7 @@
*
*/
package se.rfc.unbound;
package com.versign.tat.dnssec;
import java.util.*;

View File

@ -27,7 +27,7 @@
*
*/
package se.rfc.unbound;
package com.versign.tat.dnssec;
/**
* Codes for DNSSEC security statuses.

View File

@ -28,7 +28,7 @@
*
*/
package se.rfc.unbound;
package com.versign.tat.dnssec;
import java.io.ByteArrayOutputStream;
import java.io.IOException;

View File

@ -26,15 +26,16 @@
*
*/
package se.rfc.unbound;
package com.versign.tat.dnssec;
import java.util.HashMap;
import java.util.Map;
import org.xbill.DNS.Name;
import se.rfc.unbound.SRRset;
import se.rfc.unbound.SecurityStatus;
import com.versign.tat.dnssec.SRRset;
import com.versign.tat.dnssec.SecurityStatus;
/**
*

View File

@ -27,7 +27,7 @@
*
*/
package se.rfc.unbound;
package com.versign.tat.dnssec;
import java.util.*;

View File

@ -28,7 +28,7 @@
*
*/
package se.rfc.unbound;
package com.versign.tat.dnssec;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
@ -470,12 +470,33 @@ public class ValUtils
return false;
}
private static RRSIGRecord rrsetFirstSig(RRset rrset) {
public static RRSIGRecord rrsetFirstSig(RRset rrset) {
for (Iterator i = rrset.sigs(); i.hasNext(); ) {
return (RRSIGRecord) i.next();
}
return null;
}
public static Name longestCommonName(Name domain1, Name domain2) {
if (domain1 == null || domain2 == null) return null;
// for now, do this in a a fairly brute force way
// FIXME: convert this to direct operations on the byte[]
int this_labels = domain1.labels();
int name_labels = domain2.labels();
int l = (this_labels < name_labels) ? this_labels : name_labels;
for (int i = l; i > 0; i--)
{
Name n = new Name(domain2, name_labels - i);
if (n.equals(name, offset(this_labels - i)))
{
return n;
}
}
return root;
}
/**
* Determine by looking at a signed RRset whether or not the rrset name was
* the result of a wildcard expansion.