diff options
Diffstat (limited to 'auth/auth-certman/src/test/java/org/onap')
11 files changed, 195 insertions, 195 deletions
diff --git a/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/JU_AAF_CM.java b/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/JU_AAF_CM.java index 9f7497e0..39681cfa 100644 --- a/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/JU_AAF_CM.java +++ b/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/JU_AAF_CM.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -65,20 +65,20 @@ public class JU_AAF_CM { @Mock AuthzEnv env; - + BasicEnv baseEnv; - + @Mock PropAccess access; - + AuthzTransImpl1 trans; - + AAF_CMImpl rosettaObj = null; - + @Before public void setUp() { initMocks(this); - + try { Mockito.doReturn(access).when(env).access(); Mockito.doReturn("test.test").when(access).getProperty(Config.AAF_ROOT_NS,"org.osaaf.aaf"); @@ -95,7 +95,7 @@ public class JU_AAF_CM { Mockito.doReturn(trans).when(env).newTrans(); // Mockito.doReturn("test").when(trans).getProperty("cm_ca.props.baseSubject",null); // Mockito.doReturn(Mockito.mock(TimeTaken.class)).when(trans).start("Clear Reset Deque",8); - + Mockito.doReturn("TLSv1.1").when(access).getProperty("cadi_protocols","test"); Mockito.doReturn("https://www.google.com").when(access).getProperty(Config.AAF_URL,null); Mockito.doReturn("test").when(env).getProperty(Config.AAF_ENV); @@ -126,10 +126,10 @@ public class JU_AAF_CM { PowerMockito.mockStatic(FacadeFactory.class); FacadeFactory factObj = PowerMockito.mock(FacadeFactory.class); PowerMockito.when(factObj.v1_0(tempObj,trans, null,Data.TYPE.JSON)).thenReturn(facadeObj); - + // Mockito.doReturn(Mockito.mock(Mapper.class)).when(facadeObj).mapper(); - + rosettaObj = new AAF_CMImpl(env); } catch (Exception e) { // TODO Auto-generated catch block @@ -137,13 +137,13 @@ public class JU_AAF_CM { assertTrue(e instanceof NullPointerException); } } - + @Test public void testTestCA() { CA obj = rosettaObj.getCA("props"); assertTrue(obj instanceof CA); } - + // @Test // public void testRoute() { // try { @@ -155,7 +155,7 @@ public class JU_AAF_CM { //// System.out.println(obj); //// assertTrue(obj instanceof CA); // } - + @Test public void testFilters() { try { @@ -168,31 +168,31 @@ public class JU_AAF_CM { } // assertTrue(obj instanceof CA); } - + class AAF_CMImpl extends AAF_CM{ public AAF_CMImpl(AuthzEnv env) throws Exception { super(env); // TODO Auto-generated constructor stub } - + @Override public synchronized AAFConHttp aafCon() throws CadiException, LocatorException { return Mockito.mock(AAFConHttp.class); } - + public CMService getService() { return Mockito.mock(CMService.class); } - + @Override public void route(HttpMethods meth, String path, API api, Code code) throws Exception { - + } } - - - + + + class AuthzTransImpl1 extends AuthzTransImpl{ public AuthzTransImpl1(AuthzEnv env) { @@ -204,22 +204,22 @@ public class JU_AAF_CM { protected TimeTaken newTimeTaken(String name, int flag, Object ... values) { // TODO Auto-generated method stub TimeTaken tt= new TimeTaken("nameTest", Env.XML) { - + @Override public void output(StringBuilder sb) { // TODO Auto-generated method stub - + } }; return tt; } - + @Override public Metric auditTrail(int indent, StringBuilder sb, int ... flag) { return null; } - + } - + } diff --git a/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/api/JU_API_Artifact.java b/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/api/JU_API_Artifact.java index 31ee0727..c6a78b38 100644 --- a/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/api/JU_API_Artifact.java +++ b/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/api/JU_API_Artifact.java @@ -7,9 +7,9 @@ * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at - * * + * * * * http://www.apache.org/licenses/LICENSE-2.0 - * * + * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -42,19 +42,19 @@ import junit.framework.Assert; @RunWith(MockitoJUnitRunner.class) public class JU_API_Artifact { - + @Mock private static API_Artifact api; - + @Mock private static AAF_CM certManApi; - + private static AAF_CM noMockAPI; private static API_Artifact api_1; - + private static HttpServletRequest req; private static HttpServletResponse res; - + @BeforeClass public static void setUp() { AuthzTrans trans = mock(AuthzTrans.class); @@ -63,18 +63,18 @@ public class JU_API_Artifact { trans.setProperty("testTag", "UserValue"); trans.set(req,res); } - + @Rule public ExpectedException thrown= ExpectedException.none(); - + @Test public void placeholder() { Assert.assertTrue(true); } - + /* * These fail in builds. Need something better. - * + * * Also, they don't do much. Just catch some null pointers. @Test public void init_bothValued() { @@ -85,7 +85,7 @@ public class JU_API_Artifact { e.printStackTrace(); } } - + @Test public void init_Null_() { try { @@ -95,7 +95,7 @@ public class JU_API_Artifact { e.printStackTrace(); } } - + @Test public void init_NMC_Null() { try { @@ -105,7 +105,7 @@ public class JU_API_Artifact { e.printStackTrace(); } } - + @Test public void init_NMC() { try { diff --git a/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/api/JU_API_Cert.java b/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/api/JU_API_Cert.java index 674e4edf..4c7888dc 100644 --- a/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/api/JU_API_Cert.java +++ b/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/api/JU_API_Cert.java @@ -7,9 +7,9 @@ * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at - * * + * * * * http://www.apache.org/licenses/LICENSE-2.0 - * * + * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -42,19 +42,19 @@ import org.onap.aaf.auth.env.AuthzTrans; @RunWith(MockitoJUnitRunner.class) public class JU_API_Cert { - + @Mock private static API_Cert api; - + @Mock private static AAF_CM certManApi; - + private static AAF_CM noMockAPI; private static API_Cert api_1; - + private static HttpServletRequest req; private static HttpServletResponse res; - + @BeforeClass public static void setUp() { AuthzTrans trans = mock(AuthzTrans.class); @@ -63,10 +63,10 @@ public class JU_API_Cert { trans.setProperty("testTag", "UserValue"); trans.set(req,res); } - + @Rule public ExpectedException thrown= ExpectedException.none(); - + @Test public void init_bothValued() { try { @@ -76,7 +76,7 @@ public class JU_API_Cert { e.printStackTrace(); } } - + @Test public void init_Null_() { try { @@ -86,7 +86,7 @@ public class JU_API_Cert { e.printStackTrace(); } } - + @Test public void init_NMC_Null() { try { @@ -96,7 +96,7 @@ public class JU_API_Cert { e.printStackTrace(); } } - + @Test public void init_NMC() { try { diff --git a/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/ca/JU_AppCA.java b/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/ca/JU_AppCA.java index 48c81c50..5d91d704 100644 --- a/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/ca/JU_AppCA.java +++ b/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/ca/JU_AppCA.java @@ -7,9 +7,9 @@ * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at - * * + * * * * http://www.apache.org/licenses/LICENSE-2.0 - * * + * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -61,23 +61,23 @@ import org.onap.aaf.misc.env.Trans; //TODO: Gabe [JUnit] Import does not exist @RunWith(MockitoJUnitRunner.class) public class JU_AppCA { - + @Mock private static CachedCertDAO certDAO; - + @Mock private static HttpServletRequest req; - + @Mock private static CSRMeta csrMeta; - + static Trans trans; - + static X509andChain cert1; static byte [] name = {1,23,4,54,6,56}; - + private static LocalCA localCA; - + @BeforeClass public static void setUp() throws CertificateException, CertException, IOException { String str = "core java api"; @@ -86,196 +86,196 @@ public class JU_AppCA { req = mock(HttpServletRequest.class); localCA = mock(LocalCA.class); X509Certificate cert = new X509Certificate() { - + @Override public boolean hasUnsupportedCriticalExtension() { return false; } - + @Override public Set<String> getNonCriticalExtensionOIDs() { - + return null; } - + @Override public byte[] getExtensionValue(String oid) { - + return null; } - + @Override public Set<String> getCriticalExtensionOIDs() { - + return null; } - + @Override public void verify(PublicKey key, String sigProvider) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException { - - + + } - + @Override public void verify(PublicKey key) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException { - - + + } - + @Override public String toString() { - + return null; } - + @Override public PublicKey getPublicKey() { - + return null; } - + @Override public byte[] getEncoded() throws CertificateEncodingException { - + return null; } - + @Override public int getVersion() { - + return 0; } - + @Override public byte[] getTBSCertificate() throws CertificateEncodingException { - + return null; } - + @Override public boolean[] getSubjectUniqueID() { - + return null; } - + @Override public Principal getSubjectDN() { - + return null; } - + @Override public byte[] getSignature() { - + return null; } - + @Override public byte[] getSigAlgParams() { - + return null; } - + @Override public String getSigAlgOID() { - + return null; } - + @Override public String getSigAlgName() { - + return null; } - + @Override public BigInteger getSerialNumber() { - + return null; } - + @Override public Date getNotBefore() { - + return null; } - + @Override public Date getNotAfter() { - + return null; } - + @Override public boolean[] getKeyUsage() { - + return null; } - + @Override public boolean[] getIssuerUniqueID() { - + return null; } - + @Override public Principal getIssuerDN() { - + return null; } - + @Override public int getBasicConstraints() { - + return 0; } - + @Override public void checkValidity(Date date) throws CertificateExpiredException, CertificateNotYetValidException { - - + + } - + @Override public void checkValidity() throws CertificateExpiredException, CertificateNotYetValidException { - + } }; X509andChain xac = new X509andChain(cert, new ArrayList<>()); when(localCA.sign(Mockito.any(Trans.class), Mockito.any(CSRMeta.class))).thenReturn(xac); certDAO = mock(CachedCertDAO.class, CALLS_REAL_METHODS); } - + @Test public void identity_True() throws CertificateException, IOException, CertException { assertNotNull(localCA.sign(trans, csrMeta)); } - - + + @Test public void identityNull() throws CertificateException { try { assertNotNull(localCA.sign(null, csrMeta)); } catch (IOException e) { - + e.printStackTrace(); } catch (CertException e) { - + e.printStackTrace(); } } - + @Test public void identityBothNull() throws CertificateException { try { assertNotNull(localCA.sign(null, null)); } catch (IOException e) { - + e.printStackTrace(); } catch (CertException e) { - + e.printStackTrace(); } } diff --git a/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/ca/JU_X509ChainTest.java b/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/ca/JU_X509ChainTest.java index 4c6f7585..2560b4bf 100644 --- a/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/ca/JU_X509ChainTest.java +++ b/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/ca/JU_X509ChainTest.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/ca/JU_X509ChainWithIssuerTest.java b/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/ca/JU_X509ChainWithIssuerTest.java index dbae3fcd..c1b0f94f 100644 --- a/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/ca/JU_X509ChainWithIssuerTest.java +++ b/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/ca/JU_X509ChainWithIssuerTest.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/cert/JU_BCFactory.java b/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/cert/JU_BCFactory.java index b5f35c3a..7e0a0845 100644 --- a/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/cert/JU_BCFactory.java +++ b/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/cert/JU_BCFactory.java @@ -7,9 +7,9 @@ * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at - * * + * * * * http://www.apache.org/licenses/LICENSE-2.0 - * * + * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -48,19 +48,19 @@ import org.onap.aaf.misc.env.Trans; @RunWith(MockitoJUnitRunner.class) public class JU_BCFactory { - + private static BCFactory bcFactory = new BCFactory(); - + private static BCFactory bcFact; - + private static PrivateKey pk; - - + + private static Trans trans; - - + + private static PKCS10CertificationRequest req; - + @BeforeClass public static void setUp() throws IOException { pk = new XYZKey(); @@ -68,29 +68,29 @@ public class JU_BCFactory { req = mock(PKCS10CertificationRequest.class); when(req.getEncoded()).thenReturn(new byte[1]); when(trans.start(Mockito.anyString(), Mockito.anyInt())).thenReturn(new TimeTaken(null, 0) { - + @Override public void output(StringBuilder sb) { // TODO Auto-generated method stub - + } }); bcFact = mock(BCFactory.class); } - + @Test public void toStrin() throws OperatorCreationException, IOException, CertException { assertNotNull(bcFactory.toString(req)); } - + @Test public void toStrinMoc() throws OperatorCreationException, IOException, CertException { assertNotNull(bcFact.toString(req)); } - + @Rule public ExpectedException thrown= ExpectedException.none(); - + @Test public void toCSR() { try { @@ -100,11 +100,11 @@ public class JU_BCFactory { e.printStackTrace(); } } - + } class XYZKey implements Key, PublicKey, PrivateKey { - + int rotValue; public XYZKey() { rotValue = 1200213; diff --git a/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/data/JU_CertReqTest.java b/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/data/JU_CertReqTest.java index 8b33036f..ea7f5a86 100644 --- a/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/data/JU_CertReqTest.java +++ b/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/data/JU_CertReqTest.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/data/JU_CertRespTest.java b/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/data/JU_CertRespTest.java index 37519a30..3424de06 100644 --- a/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/data/JU_CertRespTest.java +++ b/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/data/JU_CertRespTest.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/facade/JU_FacadeImpl.java b/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/facade/JU_FacadeImpl.java index a9806439..7db1778d 100644 --- a/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/facade/JU_FacadeImpl.java +++ b/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/facade/JU_FacadeImpl.java @@ -7,9 +7,9 @@ * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at - * * + * * * * http://www.apache.org/licenses/LICENSE-2.0 - * * + * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -53,7 +53,7 @@ import org.onap.aaf.misc.env.TimeTaken; @RunWith(MockitoJUnitRunner.class) public class JU_FacadeImpl<REQ,CERT,ARTIFACTS,ERROR> { - + private static AuthzTrans trans; private static HttpServletResponse resp; private static AAF_CM certman; @@ -62,10 +62,10 @@ public class JU_FacadeImpl<REQ,CERT,ARTIFACTS,ERROR> { private Mapper<REQ,CERT,ARTIFACTS,ERROR> mapper; private Data.TYPE dataType; private static AuthzEnv env; - + private static FacadeImpl fImpl; private static HttpServletRequest req; - + @Before public void setUp() throws APIException, IOException { fImpl = mock(FacadeImpl.class); @@ -76,111 +76,111 @@ public class JU_FacadeImpl<REQ,CERT,ARTIFACTS,ERROR> { Result<Void> rvd = (Result) mock(Result.class); trans = mock(AuthzTrans.class); when(trans.error()).thenReturn(new LogTarget() { - + @Override public void printf(String fmt, Object... vars) {} - + @Override public void log(Throwable e, Object... msgs) { e.getMessage(); //e.printStackTrace(); msgs.toString(); - + } - + @Override public void log(Object... msgs) { } - + @Override public boolean isLoggable() { - + return false; } }); when(trans.start(Mockito.anyString(), Mockito.anyInt())).thenReturn(new TimeTaken("Now", 1) { - + @Override public void output(StringBuilder sb) { - + } }); when(fImpl.check(Mockito.any(AuthzTrans.class), Mockito.any(HttpServletResponse.class), Mockito.anyString())).thenReturn(rvd); when(resp.getOutputStream()).thenReturn(new ServletOutputStream() { - + @Override public void write(int b) throws IOException { - - + + } }); - + } - + @Test public void check() throws IOException { AAFPermission ap = new AAFPermission("str0","str1","str3","str2"); String perms = ap.getInstance(); assertNotNull(hImpl.check(trans, resp, perms)); } - + @Test public void checkNull() throws IOException { AAFPermission ap = new AAFPermission(null,null,"Str3","str2"); String perms = ap.getInstance(); assertNotNull(hImpl.check(trans, resp, perms)); } - + @Test public void checkTwoNull() throws IOException { AAFPermission ap = new AAFPermission(null,null,null,"str2"); String perms = ap.getInstance(); assertNotNull(fImpl.check(trans, resp, perms)); } - + @Test public void checkAllNull() throws IOException { AAFPermission ap = new AAFPermission(null,null,null,null); String perms = ap.getInstance(); assertNotNull(fImpl.check(trans, resp, perms)); } - + @Test public void checkTrans_null() throws IOException { AAFPermission ap = new AAFPermission("str0","str1","str3","str2"); String perms = ap.getInstance(); assertNotNull(hImpl.check(null, resp, perms)); } - + @Test public void checkRespNull() throws IOException { AAFPermission ap = new AAFPermission("str0","str1","str3","str2"); String perms = ap.getInstance(); assertNotNull(hImpl.check(trans, null, perms)); } - + @Test - public void requestCert() { + public void requestCert() { assertNotNull(hImpl.requestCert(trans, req, resp, null)); } - + @Test - public void renewCert() { + public void renewCert() { assertNotNull(hImpl.renewCert(trans, req, resp, true)); } - + @Test - public void dropCert() { + public void dropCert() { assertNotNull(hImpl.renewCert(trans, req, resp, true)); } - + @Test - public void createArtifacts() { + public void createArtifacts() { assertNotNull(hImpl.createArtifacts(trans, req, resp)); } - + @Test - public void readArtifacts() { + public void readArtifacts() { assertNotNull(hImpl.readArtifacts(trans, req, resp)); } } 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 80c9dbcc..f23acd83 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 @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -54,14 +54,14 @@ public class CertmanTest { // for (Item item = loc.first(); item!=null; item=loc.next(item)) { // System.out.println(loc.get(item)); // } -// -// +// +// // SecurityInfoC<HttpURLConnection> si = SecurityInfoC.instance(env, HttpURLConnection.class); -// ss = new HBasicAuthSS(si,"m12345@aaf.att.com", +// ss = new HBasicAuthSS(si,"m12345@aaf.att.com", // env.decrypt("enc:gvptdJyo0iKdVZw2rzMb0woxa7YKMdqLuhfQ4OQfZ8k",false)); // env.decrypt("enc:jFfAnO3mOKb9Gzm2OFysslmXpbnyuAxuoNJK",false), si); // SecuritySetter<HttpURLConnection> ss = new X509SS(si, "aaf"); - + // hman = new HMangr(env,loc); // // reqDF = env.newDataFactory(CertificateRequest.class); @@ -85,13 +85,13 @@ public class CertmanTest { // @Test // public void testX500Name() throws Exception { -// +// // 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()); // } -// +// // hman.best(ss, new Retryable<Void>() { // @Override // public Void code(Rcli<?> client) throws APIException, CadiException { @@ -101,7 +101,7 @@ public class CertmanTest { // cr.getFqdns().add("mithrilcsp.sbc.com"); // cr.getFqdns().add("zld01907.vci.att.com"); // cr.getFqdns().add("aaftest.test.att.com"); -// +// // String path = "/cert/local"; // Local Test //// String path = "/cert/aaf"; // Official CA // long end=0,start = System.nanoTime(); @@ -131,12 +131,12 @@ public class CertmanTest { // return null; // } // }); -// -// +// +// // } // // public X500Principal ephemeral() { // return null; // } - + } |