org.littleshoot.dnssec4j
Class DnsSec

java.lang.Object
  extended by org.littleshoot.dnssec4j.DnsSec

public class DnsSec
extends Object

DNSSEC resolver and validator.


Constructor Summary
DnsSec()
           
 
Method Summary
static InetAddress getByName(String name)
          Access the specified URL and verifies the signatures of DNSSEC responses if they exist, returning the resolved IP address.
static InetSocketAddress verify(InetSocketAddress unresolved)
          If the specified InetSocketAddress has not already resolved to an IP address, this verifies the host name and returns a new, verified and resolved InetSocketAddress.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DnsSec

public DnsSec()
Method Detail

verify

public static InetSocketAddress verify(InetSocketAddress unresolved)
                                throws DNSSECException,
                                       IOException
If the specified InetSocketAddress has not already resolved to an IP address, this verifies the host name and returns a new, verified and resolved InetSocketAddress.

Parameters:
unresolved - An unresolved InetSocketAddress.
Returns:
The resolved and verified InetSocketAddress.
Throws:
DNSSECException - If there's a problem with the DNS signature.
IOException - If there's a problem with the nameservers.

getByName

public static InetAddress getByName(String name)
                             throws DNSSECException,
                                    IOException
Access the specified URL and verifies the signatures of DNSSEC responses if they exist, returning the resolved IP address.

Parameters:
name - The name of the site.
Returns:
The IP address for the specified domain, verified if possible.
Throws:
IOException - If there's an IO error accessing the nameservers or sending or receiving messages with them.
DNSSECException - If there's a DNS error verifying the signatures for any domain.


Copyright © 2011-2013 LittleShoot. All Rights Reserved.