X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fauth-certman%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Fcm%2Ftest%2FCertmanTest.java;h=80c9dbccd8730af493f4c50ed37b8fd5724ebefa;hb=b5d91a686cede2fcf45e2b16e0141689d6c35a3f;hp=7e6c36474cc039a0c74254921e8c8b2a4619511b;hpb=ead32f193586e39b59bb366bddf70e665173a52d;p=aaf%2Fauthz.git diff --git a/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/test/CertmanTest.java b/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/test/CertmanTest.java index 7e6c3647..80c9dbcc 100644 --- a/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/test/CertmanTest.java +++ b/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/test/CertmanTest.java @@ -21,41 +21,16 @@ package org.onap.aaf.auth.cm.test; -import java.io.InputStream; -import java.net.HttpURLConnection; -import java.net.InetAddress; -import java.net.URI; -import java.security.cert.CertificateException; - -import javax.security.auth.x500.X500Principal; - import org.junit.After; -import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; -import org.junit.Test; -import static org.junit.Assert.*; import org.onap.aaf.auth.env.AuthzEnv; -import org.onap.aaf.cadi.CadiException; -import org.onap.aaf.cadi.Locator; -import org.onap.aaf.cadi.Locator.Item; -import org.onap.aaf.cadi.client.Future; -import org.onap.aaf.cadi.client.Rcli; -import org.onap.aaf.cadi.client.Retryable; -import org.onap.aaf.cadi.config.SecurityInfoC; -import org.onap.aaf.cadi.configure.Factory; import org.onap.aaf.cadi.http.HBasicAuthSS; import org.onap.aaf.cadi.http.HMangr; -import org.onap.aaf.cadi.locator.DNSLocator; -import org.onap.aaf.misc.env.APIException; -import org.onap.aaf.misc.env.Data; -import org.onap.aaf.misc.env.Data.TYPE; -import org.onap.aaf.misc.env.util.Chrono; import org.onap.aaf.misc.rosetta.env.RosettaDF; import certman.v1_0.CertInfo; import certman.v1_0.CertificateRequest; -import junit.framework.Assert; public class CertmanTest { @@ -76,7 +51,7 @@ public class CertmanTest { // } // // Locator loc = new DNSLocator(env, "https", "aaf.it.att.com", "8150"); -// for(Item item = loc.first(); item!=null; item=loc.next(item)) { +// for (Item item = loc.first(); item!=null; item=loc.next(item)) { // System.out.println(loc.get(item)); // } // @@ -111,7 +86,7 @@ public class CertmanTest { // @Test // public void testX500Name() throws Exception { // -// for( InetAddress ia : InetAddress.getAllByName("aaf.dev.att.com")) { +// for ( InetAddress ia : InetAddress.getAllByName("aaf.dev.att.com")) { // System.out.printf("%s - %s\n", ia.getHostName(), ia.getHostAddress()); // InetAddress ia1 = InetAddress.getByName(ia.getHostAddress()); // System.out.printf("%s - %s\n", ia1.getHostName(), ia1.getHostAddress()); @@ -133,12 +108,12 @@ public class CertmanTest { // try { // System.out.println(reqDF.newData().option(Data.PRETTY).load(cr).asString()); // Future f = client.updateRespondString(path, reqDF, cr); -// if(f.get(10000)) { +// if (f.get(10000)) { // end = System.nanoTime(); // System.out.println(f.body()); // CertInfo capi = certDF.newData().in(Data.TYPE.JSON).load(f.body()).asObject(); -// for(String c :capi.getCerts()) { -// for( java.security.cert.Certificate x509 : Factory.toX509Certificate(c)) { +// for (String c :capi.getCerts()) { +// for ( java.security.cert.Certificate x509 : Factory.toX509Certificate(c)) { // System.out.println(x509.toString()); // } // }