Search in sources :

Example 6 with DnssecClient

use of org.minidns.dnssec.DnssecClient in project minidns by MiniDNS.

the class DNSSECTest method testOarcDaneBadSig.

@Ignore
@IntegrationTest
public static void testOarcDaneBadSig() throws Exception {
    DNSSECClient client = new DNSSECClient(new LRUCache(1024));
    assertFalse(client.query("_443._tcp.bad-sig.dane.dns-oarc.net", Record.TYPE.TLSA).authenticData);
}
Also used : LRUCache(org.minidns.cache.LRUCache) DNSSECClient(org.minidns.dnssec.DNSSECClient) Ignore(org.junit.Ignore)

Example 7 with DnssecClient

use of org.minidns.dnssec.DnssecClient in project minidns by MiniDNS.

the class DNSSECTest method testCloudFlare.

@IntegrationTest
public static void testCloudFlare() throws IOException {
    DNSSECClient client = new DNSSECClient(new LRUCache(1024));
    assertAuthentic(client.queryDnssec("www.cloudflare-dnssec-auth.com", Record.TYPE.A));
}
Also used : LRUCache(org.minidns.cache.LRUCache) DNSSECClient(org.minidns.dnssec.DNSSECClient)

Example 8 with DnssecClient

use of org.minidns.dnssec.DnssecClient in project minidns by MiniDNS.

the class IntegrationTestTools method getClient.

public static DNSSECClient getClient(CacheConfig cacheConfig) {
    DNSCache cache;
    switch(cacheConfig) {
        case without:
            cache = null;
            break;
        case normal:
            cache = new LRUCache();
            break;
        case extended:
            cache = new ExtendedLRUCache();
            break;
        case full:
            cache = new FullLRUCache();
            break;
        default:
            throw new IllegalStateException();
    }
    DNSSECClient client = new DNSSECClient(cache);
    client.setDataSource(new NetworkDataSourceWithAccounting());
    return client;
}
Also used : ExtendedLRUCache(org.minidns.cache.ExtendedLRUCache) FullLRUCache(org.minidns.cache.FullLRUCache) ExtendedLRUCache(org.minidns.cache.ExtendedLRUCache) LRUCache(org.minidns.cache.LRUCache) FullLRUCache(org.minidns.cache.FullLRUCache) DNSSECClient(org.minidns.dnssec.DNSSECClient) DNSCache(org.minidns.DNSCache) NetworkDataSourceWithAccounting(org.minidns.source.NetworkDataSourceWithAccounting)

Example 9 with DnssecClient

use of org.minidns.dnssec.DnssecClient in project minidns by MiniDNS.

the class DNSSECTest method testUniDueSigOk.

@IntegrationTest
public static void testUniDueSigOk() throws IOException {
    DNSSECClient client = new DNSSECClient(new LRUCache(1024));
    assertAuthentic(client.queryDnssec("sigok.verteiltesysteme.net", Record.TYPE.A));
}
Also used : LRUCache(org.minidns.cache.LRUCache) DNSSECClient(org.minidns.dnssec.DNSSECClient)

Example 10 with DnssecClient

use of org.minidns.dnssec.DnssecClient in project minidns by MiniDNS.

the class DNSSECTest method testUniDueSigFail.

@IntegrationTest(expected = DNSSECValidationFailedException.class)
public static void testUniDueSigFail() throws IOException {
    DNSSECClient client = new DNSSECClient(new LRUCache(1024));
    client.query("sigfail.verteiltesysteme.net", Record.TYPE.A);
}
Also used : LRUCache(org.minidns.cache.LRUCache) DNSSECClient(org.minidns.dnssec.DNSSECClient)

Aggregations

DNSSECClient (org.minidns.dnssec.DNSSECClient)10 LRUCache (org.minidns.cache.LRUCache)5 DNSSECMessage (org.minidns.dnssec.DNSSECMessage)3 ExtendedLRUCache (org.minidns.cache.ExtendedLRUCache)2 NetworkDataSourceWithAccounting (org.minidns.source.NetworkDataSourceWithAccounting)2 Ignore (org.junit.Ignore)1 Test (org.junit.jupiter.api.Test)1 DNSCache (org.minidns.DNSCache)1 DnsClient (org.minidns.DnsClient)1 FullLRUCache (org.minidns.cache.FullLRUCache)1 DnsMessage (org.minidns.dnsmessage.DnsMessage)1 Question (org.minidns.dnsmessage.Question)1 DnssecClient (org.minidns.dnssec.DnssecClient)1 DnssecValidationFailedException (org.minidns.dnssec.DnssecValidationFailedException)1 UnverifiedReason (org.minidns.dnssec.UnverifiedReason)1