| 1 |
/* |
| 2 |
* Copyright 2015-2020 the original author or authors |
| 3 |
* |
| 4 |
* This software is licensed under the Apache License, Version 2.0, |
| 5 |
* the GNU Lesser General Public License version 2 or later ("LGPL") |
| 6 |
* and the WTFPL. |
| 7 |
* You may choose either license to govern your use of this software only |
| 8 |
* upon the condition that you accept all of the terms of either |
| 9 |
* the Apache License 2.0, the LGPL 2.1+ or the WTFPL. |
| 10 |
*/ |
| 11 |
package org.minidns.integrationtest; |
| 12 |
|
| 13 |
import org.minidns.dane.DaneVerifier; |
| 14 |
|
| 15 |
import javax.net.ssl.HttpsURLConnection; |
| 16 |
|
| 17 |
import org.junit.Ignore; |
| 18 |
|
| 19 |
import java.io.IOException; |
| 20 |
import java.net.URL; |
| 21 |
import java.security.cert.CertificateException; |
| 22 |
|
| 23 |
public class DaneTest { |
| 24 |
|
| 25 |
@Ignore |
| 26 |
@IntegrationTest |
| 27 |
public static void testOarcDaneGood() throws IOException, CertificateException { |
| 28 |
DaneVerifier daneVerifier = new DaneVerifier(); |
| 29 |
daneVerifier.verifiedConnect((HttpsURLConnection) new URL("https://good.dane.dns-oarc.net/").openConnection()); |
| 30 |
} |
| 31 |
|
| 32 |
@Ignore |
| 33 |
@IntegrationTest() |
| 34 |
public static void testOarcDaneBadHash() throws IOException, CertificateException { |
| 35 |
DaneVerifier daneVerifier = new DaneVerifier(); |
| 36 |
daneVerifier.verifiedConnect((HttpsURLConnection) new URL("https://bad-hash.dane.dns-oarc.net/").openConnection()); |
| 37 |
} |
| 38 |
|
| 39 |
@Ignore |
| 40 |
@IntegrationTest |
| 41 |
public static void testOarcDaneBadParams() throws IOException, CertificateException { |
| 42 |
DaneVerifier daneVerifier = new DaneVerifier(); |
| 43 |
daneVerifier.verifiedConnect((HttpsURLConnection) new URL("https://bad-params.dane.dns-oarc.net/").openConnection()); |
| 44 |
} |
| 45 |
} |