move into the com.verisign.tat package (leaving unbound behind. sniff.)
This commit is contained in:
parent
ac3dbc68e0
commit
a852ce1790
@ -26,7 +26,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package se.rfc.unbound;
|
package com.versign.tat.dnssec;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.*;
|
import java.util.*;
|
@ -28,7 +28,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package se.rfc.unbound;
|
package com.versign.tat.dnssec;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
@ -37,8 +37,9 @@ import java.security.*;
|
|||||||
import org.xbill.DNS.*;
|
import org.xbill.DNS.*;
|
||||||
import org.xbill.DNS.security.*;
|
import org.xbill.DNS.security.*;
|
||||||
|
|
||||||
import se.rfc.unbound.SecurityStatus;
|
import com.versign.tat.dnssec.SecurityStatus;
|
||||||
import se.rfc.unbound.Util;
|
import com.versign.tat.dnssec.Util;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A class for performing basic DNSSEC verification. The DNSJAVA package
|
* A class for performing basic DNSSEC verification. The DNSJAVA package
|
@ -27,7 +27,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package se.rfc.unbound;
|
package com.versign.tat.dnssec;
|
||||||
|
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@ -35,7 +35,8 @@ import java.util.*;
|
|||||||
import org.xbill.DNS.*;
|
import org.xbill.DNS.*;
|
||||||
import org.xbill.DNS.utils.base32;
|
import org.xbill.DNS.utils.base32;
|
||||||
|
|
||||||
import se.rfc.unbound.SignUtils.ByteArrayComparator;
|
import com.versign.tat.dnssec.SignUtils.ByteArrayComparator;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class NSEC3ValUtils
|
public class NSEC3ValUtils
|
@ -27,7 +27,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package se.rfc.unbound;
|
package com.versign.tat.dnssec;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
@ -25,7 +25,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package se.rfc.unbound;
|
package com.versign.tat.dnssec;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
@ -27,7 +27,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package se.rfc.unbound;
|
package com.versign.tat.dnssec;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Codes for DNSSEC security statuses.
|
* Codes for DNSSEC security statuses.
|
@ -28,7 +28,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package se.rfc.unbound;
|
package com.versign.tat.dnssec;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
@ -26,15 +26,16 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package se.rfc.unbound;
|
package com.versign.tat.dnssec;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.xbill.DNS.Name;
|
import org.xbill.DNS.Name;
|
||||||
|
|
||||||
import se.rfc.unbound.SRRset;
|
import com.versign.tat.dnssec.SRRset;
|
||||||
import se.rfc.unbound.SecurityStatus;
|
import com.versign.tat.dnssec.SecurityStatus;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
@ -27,7 +27,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package se.rfc.unbound;
|
package com.versign.tat.dnssec;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
@ -28,7 +28,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package se.rfc.unbound;
|
package com.versign.tat.dnssec;
|
||||||
|
|
||||||
import java.security.MessageDigest;
|
import java.security.MessageDigest;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
@ -470,12 +470,33 @@ public class ValUtils
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static RRSIGRecord rrsetFirstSig(RRset rrset) {
|
public static RRSIGRecord rrsetFirstSig(RRset rrset) {
|
||||||
for (Iterator i = rrset.sigs(); i.hasNext(); ) {
|
for (Iterator i = rrset.sigs(); i.hasNext(); ) {
|
||||||
return (RRSIGRecord) i.next();
|
return (RRSIGRecord) i.next();
|
||||||
}
|
}
|
||||||
return null;
|
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
|
* Determine by looking at a signed RRset whether or not the rrset name was
|
||||||
* the result of a wildcard expansion.
|
* the result of a wildcard expansion.
|
Loading…
Reference in New Issue
Block a user