Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 78503 invoked from network); 15 Sep 2006 01:21:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Sep 2006 01:21:07 -0000 Received: (qmail 67087 invoked by uid 500); 15 Sep 2006 01:20:50 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 67028 invoked by uid 500); 15 Sep 2006 01:20:49 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 67003 invoked by uid 99); 15 Sep 2006 01:20:49 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Sep 2006 18:20:49 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of ndbeyer@apache.org designates 140.211.166.113 as permitted sender) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Sep 2006 18:20:29 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id CAA101A983A; Thu, 14 Sep 2006 18:18:51 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r443539 [28/29] - in /incubator/harmony/enhanced/classlib/trunk/modules/security: ./ .settings/ META-INF/ make/ src/main/java/common/java/security/ src/main/java/common/java/security/acl/ src/main/java/common/java/security/cert/ src/main/ja... Date: Fri, 15 Sep 2006 01:18:16 -0000 To: harmony-commits@incubator.apache.org From: ndbeyer@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20060915011851.CAA101A983A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/spec/ECParameterSpec_ImplTest.java URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/spec/ECParameterSpec_ImplTest.java?view=diff&rev=443539&r1=443538&r2=443539 ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/spec/ECParameterSpec_ImplTest.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/spec/ECParameterSpec_ImplTest.java Thu Sep 14 18:17:39 2006 @@ -1,264 +1,264 @@ -/* - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * 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. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** -* @author Vladimir N. Molotkov -* @version $Revision$ -*/ - -package org.apache.harmony.security.tests.java.security.spec; - -import java.math.BigInteger; -import java.security.spec.ECFieldFp; -import java.security.spec.ECParameterSpec; -import java.security.spec.ECPoint; -import java.security.spec.EllipticCurve; - -import junit.framework.TestCase; - -/** - * Tests for ECParameterSpec class fields and methods. - * - */ -public class ECParameterSpec_ImplTest extends TestCase { - - // - // Tests - // - // NOTE: the following tests use EC domain parameters - // which are invalid for real EC cryptography application - // but must be acceptable by the class under test according - // to the API specification - // - - /** - * Test #1 for ECParameterSpec(EllipticCurve, ECPoint, BigInteger, int) constructor
- * Assertion: creates ECParameterSpec instance
- * Test preconditions: valid parameters passed
- * Expected: must pass without any exceptions - */ - public final void testECParameterSpec01() { - // Valid (see note below) parameters set - EllipticCurve c = - new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), - BigInteger.ZERO, - BigInteger.valueOf(4L)); - ECPoint g = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); - new ECParameterSpec(c, g, BigInteger.valueOf(5L), 10); - } - - /** - * Test #2 for ECParameterSpec(EllipticCurve, ECPoint, BigInteger, int) constructor
- * Assertion: throws NullPointerException if - * curve, generator or order is null
- * Test preconditions: pass null as mentioned parameters
- * Expected: must throw NullPointerException - */ - public final void testECParameterSpec02() { - // Valid (see note below) parameters set - EllipticCurve curve = - new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), - BigInteger.ZERO, - BigInteger.valueOf(4L)); - ECPoint generator = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); - BigInteger order = BigInteger.valueOf(5L); - - // Test case 1: curve is null - try { - new ECParameterSpec(null, generator, order, 10); - fail("#1: Expected NPE not thrown"); - } catch (NullPointerException ok) { - } - - - // Test case 2: generator is null - try { - new ECParameterSpec(curve, null, order, 10); - fail("#2: Expected NPE not thrown"); - } catch (NullPointerException ok) { - } - - - // Test case 3: order is null - try { - new ECParameterSpec(curve, generator, null, 10); - fail("#3: Expected NPE not thrown"); - } catch (NullPointerException ok) { - } - - - // Test case 4: all above are null - try { - new ECParameterSpec(null, null, null, 10); - fail("#4: Expected NPE not thrown"); - } catch (NullPointerException ok) { - } - } - - /** - * Test #3 for ECParameterSpec(EllipticCurve, ECPoint, BigInteger, int) constructor
- * Assertion: throws IllegalArgumentException if - * order or cofactor is not positive
- * Test preconditions: pass not positive as mentioned parameters
- * Expected: must throw IllegalArgumentException - */ - public final void testECParameterSpec03() { - // Valid (see note below) parameters set - EllipticCurve curve = - new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), - BigInteger.ZERO, - BigInteger.valueOf(4L)); - ECPoint generator = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); - - - // Test case 1: order is negative - try { - new ECParameterSpec(curve, generator, BigInteger.valueOf(-5L), 10); - fail("#1: Expected IAE not thrown"); - } catch (IllegalArgumentException ok) { - } - - - // Test case 2: order == 0 - try { - new ECParameterSpec(curve, generator, BigInteger.ZERO, 10); - fail("#2: Expected IAE not thrown"); - } catch (IllegalArgumentException ok) { - } - - - // Test case 3: cofactor is negative - try { - new ECParameterSpec(curve, generator, BigInteger.valueOf(5L), -10); - fail("#3: Expected IAE not thrown"); - } catch (IllegalArgumentException ok) { - } - - - // Test case 4: cofactor == 0 - try { - new ECParameterSpec(curve, generator, BigInteger.valueOf(5L), 0); - fail("#4: Expected IAE not thrown"); - } catch (IllegalArgumentException ok) { - } - - - // Test case 5: both order and cofactor are not positive - try { - new ECParameterSpec(curve, generator, BigInteger.valueOf(-5L), 0); - fail("#5: Expected IAE not thrown"); - } catch (IllegalArgumentException ok) { - } - } - - /** - * Test for getCofactor() method
- * Assertion: returns cofactor
- * Test preconditions: ECParameterSpec instance - * created using valid parameters
- * Expected: must return cofactor value which is equal - * to the one passed to the constructor - */ - public final void testGetCofactor() { - // Valid (see note below) parameters set - EllipticCurve curve = - new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), - BigInteger.ZERO, - BigInteger.valueOf(4L)); - ECPoint generator = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); - BigInteger order = BigInteger.valueOf(5L); - int cofactor = 10; - ECParameterSpec ps = - new ECParameterSpec(curve, generator, order, cofactor); - assertEquals(cofactor, ps.getCofactor()); - } - - /** - * Test for getCurve() method
- * Assertion: returns curve
- * Test preconditions: ECParameterSpec instance - * created using valid parameters
- * Expected: must return ref to the EllipticCurve object - * which is equal to the one passed to the constructor; (both must refer - * the same object) - */ - public final void testGetCurve() { - // Valid (see note below) parameters set - EllipticCurve curve = - new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), - BigInteger.ZERO, - BigInteger.valueOf(4L)); - ECPoint generator = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); - BigInteger order = BigInteger.valueOf(5L); - int cofactor = 10; - ECParameterSpec ps = - new ECParameterSpec(curve, generator, order, cofactor); - EllipticCurve curveRet = ps.getCurve(); - assertEquals(curve, curveRet); - assertSame(curve, curveRet); - } - - /** - * Test for getGenerator() method
- * Assertion: returns generator
- * Test preconditions: ECParameterSpec instance - * created using valid parameters
- * Expected: must return ref to the ECPoint object - * which is equal to the one passed to the constructor; (both must refer - * the same object) - */ - public final void testGetGenerator() { - // Valid (see note below) parameters set - EllipticCurve curve = - new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), - BigInteger.ZERO, - BigInteger.valueOf(4L)); - ECPoint generator = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); - BigInteger order = BigInteger.valueOf(5L); - int cofactor = 10; - ECParameterSpec ps = - new ECParameterSpec(curve, generator, order, cofactor); - ECPoint generatorRet = ps.getGenerator(); - assertEquals(generator, generatorRet); - assertSame(generator, generatorRet); - } - - /** - * Test for getOrder() method
- * Assertion: returns order
- * Test preconditions: ECParameterSpec instance - * created using valid parameters
- * Expected: must return ref to the BigInteger object - * which is equal to the one passed to the constructor; (both must refer - * the same object) - */ - public final void testGetOrder() { - // Valid (see note below) parameters set - EllipticCurve curve = - new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), - BigInteger.ZERO, - BigInteger.valueOf(4L)); - ECPoint generator = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); - BigInteger order = BigInteger.valueOf(5L); - int cofactor = 10; - ECParameterSpec ps = - new ECParameterSpec(curve, generator, order, cofactor); - BigInteger orderRet = ps.getOrder(); - assertEquals(order, orderRet); - assertSame(order, orderRet); - } - -} +/* + * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + * 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. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** +* @author Vladimir N. Molotkov +* @version $Revision$ +*/ + +package org.apache.harmony.security.tests.java.security.spec; + +import java.math.BigInteger; +import java.security.spec.ECFieldFp; +import java.security.spec.ECParameterSpec; +import java.security.spec.ECPoint; +import java.security.spec.EllipticCurve; + +import junit.framework.TestCase; + +/** + * Tests for ECParameterSpec class fields and methods. + * + */ +public class ECParameterSpec_ImplTest extends TestCase { + + // + // Tests + // + // NOTE: the following tests use EC domain parameters + // which are invalid for real EC cryptography application + // but must be acceptable by the class under test according + // to the API specification + // + + /** + * Test #1 for ECParameterSpec(EllipticCurve, ECPoint, BigInteger, int) constructor
+ * Assertion: creates ECParameterSpec instance
+ * Test preconditions: valid parameters passed
+ * Expected: must pass without any exceptions + */ + public final void testECParameterSpec01() { + // Valid (see note below) parameters set + EllipticCurve c = + new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), + BigInteger.ZERO, + BigInteger.valueOf(4L)); + ECPoint g = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); + new ECParameterSpec(c, g, BigInteger.valueOf(5L), 10); + } + + /** + * Test #2 for ECParameterSpec(EllipticCurve, ECPoint, BigInteger, int) constructor
+ * Assertion: throws NullPointerException if + * curve, generator or order is null
+ * Test preconditions: pass null as mentioned parameters
+ * Expected: must throw NullPointerException + */ + public final void testECParameterSpec02() { + // Valid (see note below) parameters set + EllipticCurve curve = + new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), + BigInteger.ZERO, + BigInteger.valueOf(4L)); + ECPoint generator = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); + BigInteger order = BigInteger.valueOf(5L); + + // Test case 1: curve is null + try { + new ECParameterSpec(null, generator, order, 10); + fail("#1: Expected NPE not thrown"); + } catch (NullPointerException ok) { + } + + + // Test case 2: generator is null + try { + new ECParameterSpec(curve, null, order, 10); + fail("#2: Expected NPE not thrown"); + } catch (NullPointerException ok) { + } + + + // Test case 3: order is null + try { + new ECParameterSpec(curve, generator, null, 10); + fail("#3: Expected NPE not thrown"); + } catch (NullPointerException ok) { + } + + + // Test case 4: all above are null + try { + new ECParameterSpec(null, null, null, 10); + fail("#4: Expected NPE not thrown"); + } catch (NullPointerException ok) { + } + } + + /** + * Test #3 for ECParameterSpec(EllipticCurve, ECPoint, BigInteger, int) constructor
+ * Assertion: throws IllegalArgumentException if + * order or cofactor is not positive
+ * Test preconditions: pass not positive as mentioned parameters
+ * Expected: must throw IllegalArgumentException + */ + public final void testECParameterSpec03() { + // Valid (see note below) parameters set + EllipticCurve curve = + new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), + BigInteger.ZERO, + BigInteger.valueOf(4L)); + ECPoint generator = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); + + + // Test case 1: order is negative + try { + new ECParameterSpec(curve, generator, BigInteger.valueOf(-5L), 10); + fail("#1: Expected IAE not thrown"); + } catch (IllegalArgumentException ok) { + } + + + // Test case 2: order == 0 + try { + new ECParameterSpec(curve, generator, BigInteger.ZERO, 10); + fail("#2: Expected IAE not thrown"); + } catch (IllegalArgumentException ok) { + } + + + // Test case 3: cofactor is negative + try { + new ECParameterSpec(curve, generator, BigInteger.valueOf(5L), -10); + fail("#3: Expected IAE not thrown"); + } catch (IllegalArgumentException ok) { + } + + + // Test case 4: cofactor == 0 + try { + new ECParameterSpec(curve, generator, BigInteger.valueOf(5L), 0); + fail("#4: Expected IAE not thrown"); + } catch (IllegalArgumentException ok) { + } + + + // Test case 5: both order and cofactor are not positive + try { + new ECParameterSpec(curve, generator, BigInteger.valueOf(-5L), 0); + fail("#5: Expected IAE not thrown"); + } catch (IllegalArgumentException ok) { + } + } + + /** + * Test for getCofactor() method
+ * Assertion: returns cofactor
+ * Test preconditions: ECParameterSpec instance + * created using valid parameters
+ * Expected: must return cofactor value which is equal + * to the one passed to the constructor + */ + public final void testGetCofactor() { + // Valid (see note below) parameters set + EllipticCurve curve = + new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), + BigInteger.ZERO, + BigInteger.valueOf(4L)); + ECPoint generator = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); + BigInteger order = BigInteger.valueOf(5L); + int cofactor = 10; + ECParameterSpec ps = + new ECParameterSpec(curve, generator, order, cofactor); + assertEquals(cofactor, ps.getCofactor()); + } + + /** + * Test for getCurve() method
+ * Assertion: returns curve
+ * Test preconditions: ECParameterSpec instance + * created using valid parameters
+ * Expected: must return ref to the EllipticCurve object + * which is equal to the one passed to the constructor; (both must refer + * the same object) + */ + public final void testGetCurve() { + // Valid (see note below) parameters set + EllipticCurve curve = + new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), + BigInteger.ZERO, + BigInteger.valueOf(4L)); + ECPoint generator = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); + BigInteger order = BigInteger.valueOf(5L); + int cofactor = 10; + ECParameterSpec ps = + new ECParameterSpec(curve, generator, order, cofactor); + EllipticCurve curveRet = ps.getCurve(); + assertEquals(curve, curveRet); + assertSame(curve, curveRet); + } + + /** + * Test for getGenerator() method
+ * Assertion: returns generator
+ * Test preconditions: ECParameterSpec instance + * created using valid parameters
+ * Expected: must return ref to the ECPoint object + * which is equal to the one passed to the constructor; (both must refer + * the same object) + */ + public final void testGetGenerator() { + // Valid (see note below) parameters set + EllipticCurve curve = + new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), + BigInteger.ZERO, + BigInteger.valueOf(4L)); + ECPoint generator = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); + BigInteger order = BigInteger.valueOf(5L); + int cofactor = 10; + ECParameterSpec ps = + new ECParameterSpec(curve, generator, order, cofactor); + ECPoint generatorRet = ps.getGenerator(); + assertEquals(generator, generatorRet); + assertSame(generator, generatorRet); + } + + /** + * Test for getOrder() method
+ * Assertion: returns order
+ * Test preconditions: ECParameterSpec instance + * created using valid parameters
+ * Expected: must return ref to the BigInteger object + * which is equal to the one passed to the constructor; (both must refer + * the same object) + */ + public final void testGetOrder() { + // Valid (see note below) parameters set + EllipticCurve curve = + new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), + BigInteger.ZERO, + BigInteger.valueOf(4L)); + ECPoint generator = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); + BigInteger order = BigInteger.valueOf(5L); + int cofactor = 10; + ECParameterSpec ps = + new ECParameterSpec(curve, generator, order, cofactor); + BigInteger orderRet = ps.getOrder(); + assertEquals(order, orderRet); + assertSame(order, orderRet); + } + +} Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/spec/ECParameterSpec_ImplTest.java ------------------------------------------------------------------------------ svn:eol-style = native Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/spec/ECPrivateKeySpec_ImplTest.java URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/spec/ECPrivateKeySpec_ImplTest.java?view=diff&rev=443539&r1=443538&r2=443539 ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/spec/ECPrivateKeySpec_ImplTest.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/spec/ECPrivateKeySpec_ImplTest.java Thu Sep 14 18:17:39 2006 @@ -1,158 +1,158 @@ -/* - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * 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. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** -* @author Vladimir N. Molotkov -* @version $Revision$ -*/ - -package org.apache.harmony.security.tests.java.security.spec; - -import java.math.BigInteger; -import java.security.spec.ECFieldFp; -import java.security.spec.ECParameterSpec; -import java.security.spec.ECPoint; -import java.security.spec.ECPrivateKeySpec; -import java.security.spec.EllipticCurve; - -import junit.framework.TestCase; - -/** - * Tests for ECPrivateKeySpec class fields and methods. - * - */ -public class ECPrivateKeySpec_ImplTest extends TestCase { - - // - // Tests - // - // NOTE: the following tests use EC domain parameters - // which are invalid for real EC cryptography application - // but must be acceptable by the class under test according - // to the API specification - // - - /** - * Test #1 for ECPrivateKeySpec(BigInteger, ECParameterSpec) constructor
- * Assertion: creates ECPrivateKeySpec instance
- * Test preconditions: valid parameters passed
- * Expected: must pass without any exceptions - */ - public final void testECPrivateKeySpec01() { - // Valid (see note below) parameters set - EllipticCurve c = - new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), - BigInteger.ZERO, - BigInteger.valueOf(4L)); - ECPoint g = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); - new ECPrivateKeySpec(BigInteger.ZERO, - new ECParameterSpec(c, g, BigInteger.valueOf(5L), 10)); - - } - - /** - * Test #2 for ECPrivateKeySpec(BigInteger, ECParameterSpec) constructor
- * Assertion: throws NullPointerException if - * s or params is null
- * Test preconditions: pass null as mentioned parameters
- * Expected: must throw NullPointerException - */ - public final void testECPrivateKeySpec02() { - // Valid (see note below) parameters set - EllipticCurve c = - new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), - BigInteger.ZERO, - BigInteger.valueOf(4L)); - ECPoint g = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); - - // Test case 1: s is null - try { - new ECPrivateKeySpec(null, - new ECParameterSpec(c, g, BigInteger.valueOf(5L), 10)); - fail("#1: Expected NPE not thrown"); - } catch (NullPointerException ok) { - } - - - // Test case 2: params is null - try { - new ECPrivateKeySpec(BigInteger.valueOf(0L), null); - fail("#2: Expected NPE not thrown"); - } catch (NullPointerException ok) { - } - - - // Test case 3: both s and params are null - try { - new ECPrivateKeySpec(null, null); - fail("#3: Expected NPE not thrown"); - } catch (NullPointerException ok) { - } - } - - /** - * Test for getParams() method
- * Assertion: returns associated EC parameters
- * Test preconditions: ECPrivateKeySpec instance - * created using valid parameters
- * Expected: must return params value which is equal - * to the one passed to the constructor; (both must refer - * the same object) - */ - public final void testGetParams() { - // Valid (see note below) parameters set - EllipticCurve c = - new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), - BigInteger.ZERO, - BigInteger.valueOf(4L)); - ECPoint g = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); - ECParameterSpec params = - new ECParameterSpec(c, g, BigInteger.valueOf(5L), 10); - - ECPrivateKeySpec ks = new ECPrivateKeySpec(BigInteger.ZERO, params); - ECParameterSpec paramsRet = ks.getParams(); - - assertEquals(params, paramsRet); - assertSame(params, paramsRet); - } - - /** - * Test for getS() method
- * Assertion: returns associated private value
- * Test preconditions: ECPrivateKeySpec instance - * created using valid parameters
- * Expected: must return s value which is equal - * to the one passed to the constructor; (both must refer - * the same object) - */ - public final void testGetS() { - // Valid (see note below) parameters set - EllipticCurve c = - new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), - BigInteger.ZERO, - BigInteger.valueOf(4L)); - ECPoint g = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); - ECParameterSpec params = - new ECParameterSpec(c, g, BigInteger.valueOf(5L), 10); - BigInteger s = BigInteger.valueOf(5L); - - ECPrivateKeySpec ks = new ECPrivateKeySpec(s, params); - BigInteger sRet = ks.getS(); - - assertEquals(s, sRet); - assertSame(s, sRet); - } -} +/* + * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + * 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. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** +* @author Vladimir N. Molotkov +* @version $Revision$ +*/ + +package org.apache.harmony.security.tests.java.security.spec; + +import java.math.BigInteger; +import java.security.spec.ECFieldFp; +import java.security.spec.ECParameterSpec; +import java.security.spec.ECPoint; +import java.security.spec.ECPrivateKeySpec; +import java.security.spec.EllipticCurve; + +import junit.framework.TestCase; + +/** + * Tests for ECPrivateKeySpec class fields and methods. + * + */ +public class ECPrivateKeySpec_ImplTest extends TestCase { + + // + // Tests + // + // NOTE: the following tests use EC domain parameters + // which are invalid for real EC cryptography application + // but must be acceptable by the class under test according + // to the API specification + // + + /** + * Test #1 for ECPrivateKeySpec(BigInteger, ECParameterSpec) constructor
+ * Assertion: creates ECPrivateKeySpec instance
+ * Test preconditions: valid parameters passed
+ * Expected: must pass without any exceptions + */ + public final void testECPrivateKeySpec01() { + // Valid (see note below) parameters set + EllipticCurve c = + new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), + BigInteger.ZERO, + BigInteger.valueOf(4L)); + ECPoint g = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); + new ECPrivateKeySpec(BigInteger.ZERO, + new ECParameterSpec(c, g, BigInteger.valueOf(5L), 10)); + + } + + /** + * Test #2 for ECPrivateKeySpec(BigInteger, ECParameterSpec) constructor
+ * Assertion: throws NullPointerException if + * s or params is null
+ * Test preconditions: pass null as mentioned parameters
+ * Expected: must throw NullPointerException + */ + public final void testECPrivateKeySpec02() { + // Valid (see note below) parameters set + EllipticCurve c = + new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), + BigInteger.ZERO, + BigInteger.valueOf(4L)); + ECPoint g = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); + + // Test case 1: s is null + try { + new ECPrivateKeySpec(null, + new ECParameterSpec(c, g, BigInteger.valueOf(5L), 10)); + fail("#1: Expected NPE not thrown"); + } catch (NullPointerException ok) { + } + + + // Test case 2: params is null + try { + new ECPrivateKeySpec(BigInteger.valueOf(0L), null); + fail("#2: Expected NPE not thrown"); + } catch (NullPointerException ok) { + } + + + // Test case 3: both s and params are null + try { + new ECPrivateKeySpec(null, null); + fail("#3: Expected NPE not thrown"); + } catch (NullPointerException ok) { + } + } + + /** + * Test for getParams() method
+ * Assertion: returns associated EC parameters
+ * Test preconditions: ECPrivateKeySpec instance + * created using valid parameters
+ * Expected: must return params value which is equal + * to the one passed to the constructor; (both must refer + * the same object) + */ + public final void testGetParams() { + // Valid (see note below) parameters set + EllipticCurve c = + new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), + BigInteger.ZERO, + BigInteger.valueOf(4L)); + ECPoint g = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); + ECParameterSpec params = + new ECParameterSpec(c, g, BigInteger.valueOf(5L), 10); + + ECPrivateKeySpec ks = new ECPrivateKeySpec(BigInteger.ZERO, params); + ECParameterSpec paramsRet = ks.getParams(); + + assertEquals(params, paramsRet); + assertSame(params, paramsRet); + } + + /** + * Test for getS() method
+ * Assertion: returns associated private value
+ * Test preconditions: ECPrivateKeySpec instance + * created using valid parameters
+ * Expected: must return s value which is equal + * to the one passed to the constructor; (both must refer + * the same object) + */ + public final void testGetS() { + // Valid (see note below) parameters set + EllipticCurve c = + new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), + BigInteger.ZERO, + BigInteger.valueOf(4L)); + ECPoint g = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); + ECParameterSpec params = + new ECParameterSpec(c, g, BigInteger.valueOf(5L), 10); + BigInteger s = BigInteger.valueOf(5L); + + ECPrivateKeySpec ks = new ECPrivateKeySpec(s, params); + BigInteger sRet = ks.getS(); + + assertEquals(s, sRet); + assertSame(s, sRet); + } +} Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/spec/ECPrivateKeySpec_ImplTest.java ------------------------------------------------------------------------------ svn:eol-style = native Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/spec/ECPublicKeySpec_ImplTest.java URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/spec/ECPublicKeySpec_ImplTest.java?view=diff&rev=443539&r1=443538&r2=443539 ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/spec/ECPublicKeySpec_ImplTest.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/spec/ECPublicKeySpec_ImplTest.java Thu Sep 14 18:17:39 2006 @@ -1,181 +1,181 @@ -/* - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * 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. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** -* @author Vladimir N. Molotkov -* @version $Revision$ -*/ - -package org.apache.harmony.security.tests.java.security.spec; - -import java.math.BigInteger; -import java.security.spec.ECFieldFp; -import java.security.spec.ECParameterSpec; -import java.security.spec.ECPoint; -import java.security.spec.ECPublicKeySpec; -import java.security.spec.EllipticCurve; - -import junit.framework.TestCase; - -/** - * Tests for ECPublicKeySpec class fields and methods. - * - */ -public class ECPublicKeySpec_ImplTest extends TestCase { - - // - // Tests - // - // NOTE: the following tests use EC domain parameters - // which are invalid for real EC cryptography application - // but must be acceptable by the class under test according - // to the API specification - // - - /** - * Test #1 for ECPublicKeySpec(ECPoint, ECParameterSpec) constructor
- * Assertion: creates ECPublicKeySpec instance
- * Test preconditions: valid parameters passed
- * Expected: must pass without any exceptions - */ - public final void testECPublicKeySpec01() { - // Valid (see note below) parameters set - EllipticCurve c = - new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), - BigInteger.ZERO, - BigInteger.valueOf(4L)); - ECPoint g = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); - new ECPublicKeySpec(g, - new ECParameterSpec(c, g, BigInteger.valueOf(5L), 10)); - - } - - /** - * Test #2 for ECPublicKeySpec(ECPoint, ECParameterSpec) constructor
- * Assertion: throws NullPointerException if - * w or params is null
- * Test preconditions: pass null as mentioned parameters
- * Expected: must throw NullPointerException - */ - public final void testECPublicKeySpec02() { - // Valid (see note below) parameters set - EllipticCurve c = - new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), - BigInteger.ZERO, - BigInteger.valueOf(4L)); - ECPoint g = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); - - // Test case 1: w is null - try { - new ECPublicKeySpec(null, - new ECParameterSpec(c, g, BigInteger.valueOf(5L), 10)); - fail("#1: Expected NPE not thrown"); - } catch (NullPointerException ok) { - } - - - // Test case 2: params is null - try { - new ECPublicKeySpec(g, null); - fail("#2: Expected NPE not thrown"); - } catch (NullPointerException ok) { - } - - - // Test case 3: both w and params are null - try { - new ECPublicKeySpec(null, null); - fail("#3: Expected NPE not thrown"); - } catch (NullPointerException ok) { - } - } - - /** - * Test #3 for ECPublicKeySpec(ECPoint, ECParameterSpec) constructor
- * Assertion: throws IllegalArgumentException if - * w is point at infinity
- * Test preconditions: pass ECPoint.POINT_INFINITY - * as mentioned parameter value
- * Expected: must throw IllegalArgumentException - */ - public final void testECPublicKeySpec03() { - // Valid (see note below) parameters set - EllipticCurve c = - new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), - BigInteger.ZERO, - BigInteger.valueOf(4L)); - ECPoint g = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); - - try { - new ECPublicKeySpec(ECPoint.POINT_INFINITY, - new ECParameterSpec(c, g, BigInteger.valueOf(5L), 10)); - fail("Expected IAE not thrown"); - } catch (IllegalArgumentException ok) { - } - } - - /** - * Test for getParams() method
- * Assertion: returns associated EC parameters
- * Test preconditions: ECPublicKeySpec instance - * created using valid parameters
- * Expected: must return params value which is equal - * to the one passed to the constructor; (both must refer - * the same object) - */ - public final void testGetParams() { - // Valid (see note below) parameters set - EllipticCurve c = - new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), - BigInteger.ZERO, - BigInteger.valueOf(4L)); - ECPoint g = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); - ECParameterSpec params = - new ECParameterSpec(c, g, BigInteger.valueOf(5L), 10); - - ECPublicKeySpec ks = new ECPublicKeySpec(g, params); - ECParameterSpec paramsRet = ks.getParams(); - - assertEquals(params, paramsRet); - assertSame(params, paramsRet); - } - - /** - * Test for getW() method
- * Assertion: returns associated public point
- * Test preconditions: ECPublicKeySpec instance - * created using valid parameters
- * Expected: must return w value which is equal - * to the one passed to the constructor; (both must refer - * the same object) - */ - public final void testGetW() { - // Valid (see note below) parameters set - EllipticCurve c = - new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), - BigInteger.ZERO, - BigInteger.valueOf(4L)); - ECPoint g = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); - ECParameterSpec params = - new ECParameterSpec(c, g, BigInteger.valueOf(5L), 10); - - ECPublicKeySpec ks = new ECPublicKeySpec(g, params); - ECPoint wRet = ks.getW(); - - assertEquals(g, wRet); - assertSame(g, wRet); - } -} +/* + * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + * 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. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** +* @author Vladimir N. Molotkov +* @version $Revision$ +*/ + +package org.apache.harmony.security.tests.java.security.spec; + +import java.math.BigInteger; +import java.security.spec.ECFieldFp; +import java.security.spec.ECParameterSpec; +import java.security.spec.ECPoint; +import java.security.spec.ECPublicKeySpec; +import java.security.spec.EllipticCurve; + +import junit.framework.TestCase; + +/** + * Tests for ECPublicKeySpec class fields and methods. + * + */ +public class ECPublicKeySpec_ImplTest extends TestCase { + + // + // Tests + // + // NOTE: the following tests use EC domain parameters + // which are invalid for real EC cryptography application + // but must be acceptable by the class under test according + // to the API specification + // + + /** + * Test #1 for ECPublicKeySpec(ECPoint, ECParameterSpec) constructor
+ * Assertion: creates ECPublicKeySpec instance
+ * Test preconditions: valid parameters passed
+ * Expected: must pass without any exceptions + */ + public final void testECPublicKeySpec01() { + // Valid (see note below) parameters set + EllipticCurve c = + new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), + BigInteger.ZERO, + BigInteger.valueOf(4L)); + ECPoint g = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); + new ECPublicKeySpec(g, + new ECParameterSpec(c, g, BigInteger.valueOf(5L), 10)); + + } + + /** + * Test #2 for ECPublicKeySpec(ECPoint, ECParameterSpec) constructor
+ * Assertion: throws NullPointerException if + * w or params is null
+ * Test preconditions: pass null as mentioned parameters
+ * Expected: must throw NullPointerException + */ + public final void testECPublicKeySpec02() { + // Valid (see note below) parameters set + EllipticCurve c = + new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), + BigInteger.ZERO, + BigInteger.valueOf(4L)); + ECPoint g = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); + + // Test case 1: w is null + try { + new ECPublicKeySpec(null, + new ECParameterSpec(c, g, BigInteger.valueOf(5L), 10)); + fail("#1: Expected NPE not thrown"); + } catch (NullPointerException ok) { + } + + + // Test case 2: params is null + try { + new ECPublicKeySpec(g, null); + fail("#2: Expected NPE not thrown"); + } catch (NullPointerException ok) { + } + + + // Test case 3: both w and params are null + try { + new ECPublicKeySpec(null, null); + fail("#3: Expected NPE not thrown"); + } catch (NullPointerException ok) { + } + } + + /** + * Test #3 for ECPublicKeySpec(ECPoint, ECParameterSpec) constructor
+ * Assertion: throws IllegalArgumentException if + * w is point at infinity
+ * Test preconditions: pass ECPoint.POINT_INFINITY + * as mentioned parameter value
+ * Expected: must throw IllegalArgumentException + */ + public final void testECPublicKeySpec03() { + // Valid (see note below) parameters set + EllipticCurve c = + new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), + BigInteger.ZERO, + BigInteger.valueOf(4L)); + ECPoint g = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); + + try { + new ECPublicKeySpec(ECPoint.POINT_INFINITY, + new ECParameterSpec(c, g, BigInteger.valueOf(5L), 10)); + fail("Expected IAE not thrown"); + } catch (IllegalArgumentException ok) { + } + } + + /** + * Test for getParams() method
+ * Assertion: returns associated EC parameters
+ * Test preconditions: ECPublicKeySpec instance + * created using valid parameters
+ * Expected: must return params value which is equal + * to the one passed to the constructor; (both must refer + * the same object) + */ + public final void testGetParams() { + // Valid (see note below) parameters set + EllipticCurve c = + new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), + BigInteger.ZERO, + BigInteger.valueOf(4L)); + ECPoint g = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); + ECParameterSpec params = + new ECParameterSpec(c, g, BigInteger.valueOf(5L), 10); + + ECPublicKeySpec ks = new ECPublicKeySpec(g, params); + ECParameterSpec paramsRet = ks.getParams(); + + assertEquals(params, paramsRet); + assertSame(params, paramsRet); + } + + /** + * Test for getW() method
+ * Assertion: returns associated public point
+ * Test preconditions: ECPublicKeySpec instance + * created using valid parameters
+ * Expected: must return w value which is equal + * to the one passed to the constructor; (both must refer + * the same object) + */ + public final void testGetW() { + // Valid (see note below) parameters set + EllipticCurve c = + new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), + BigInteger.ZERO, + BigInteger.valueOf(4L)); + ECPoint g = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); + ECParameterSpec params = + new ECParameterSpec(c, g, BigInteger.valueOf(5L), 10); + + ECPublicKeySpec ks = new ECPublicKeySpec(g, params); + ECPoint wRet = ks.getW(); + + assertEquals(g, wRet); + assertSame(g, wRet); + } +} Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/spec/ECPublicKeySpec_ImplTest.java ------------------------------------------------------------------------------ svn:eol-style = native Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/spec/EllipticCurve_ImplTest.java URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/spec/EllipticCurve_ImplTest.java?view=diff&rev=443539&r1=443538&r2=443539 ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/spec/EllipticCurve_ImplTest.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/spec/EllipticCurve_ImplTest.java Thu Sep 14 18:17:39 2006 @@ -1,111 +1,111 @@ -/* - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * 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. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** -* @author Vladimir N. Molotkov -* @version $Revision$ -*/ - -package org.apache.harmony.security.tests.java.security.spec; - -import java.math.BigInteger; -import java.security.spec.ECFieldF2m; -import java.security.spec.ECFieldFp; -import java.security.spec.EllipticCurve; - -import junit.framework.TestCase; - -/** - * Tests for EllipticCurve class fields and methods. - * - */ -public class EllipticCurve_ImplTest extends TestCase { - - /** - * Test #2 for equals(Object other) method
- * Assertion: return false if this and other objects are not equal
- * Test preconditions: see test comments
- * Expected: all objects in this test must be NOT equal - */ - public final void testEqualsObject02() { - // test case 1: must not be equal to null - EllipticCurve c2=null, c1 = - new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), - BigInteger.ONE, - BigInteger.valueOf(19L)); - assertFalse(c1.equals(c2)); - - // test case 2: not equal objects - field - c1 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), - BigInteger.ONE, - BigInteger.valueOf(19L)); - c2 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(31L)), - BigInteger.valueOf(1L), - BigInteger.valueOf(19L)); - assertFalse(c1.equals(c2) || c2.equals(c1)); - - // test case 3: not equal objects - a - c1 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), - BigInteger.ONE, - BigInteger.valueOf(19L)); - c2 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), - BigInteger.ZERO, - BigInteger.valueOf(19L)); - assertFalse(c1.equals(c2) || c2.equals(c1)); - - // test case 4: not equal objects - b - c1 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), - BigInteger.ONE, - BigInteger.valueOf(19L)); - c2 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), - BigInteger.ONE, - BigInteger.valueOf(17L)); - assertFalse(c1.equals(c2) || c2.equals(c1)); - - // test case 5: not equal objects - both seed not null - c1 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), - BigInteger.ONE, - BigInteger.valueOf(19L), - new byte[24]); - c2 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), - BigInteger.valueOf(1L), - BigInteger.valueOf(19L), - new byte[25]); - assertFalse(c1.equals(c2) || c2.equals(c1)); - - // test case 6: not equal objects - one seed is null - c1 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), - BigInteger.ONE, - BigInteger.valueOf(19L), - null); - c2 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), - BigInteger.valueOf(1L), - BigInteger.valueOf(19L), - new byte[24]); - assertFalse(c1.equals(c2) || c2.equals(c1)); - - // test case 7: not equal objects - field class - c1 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), - BigInteger.ONE, - BigInteger.valueOf(19L), - new byte[24]); - c2 = new EllipticCurve(new ECFieldF2m(5), - BigInteger.ONE, - BigInteger.valueOf(19L), - new byte[24]); - assertFalse(c1.equals(c2) || c2.equals(c1)); - } -} +/* + * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + * 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. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** +* @author Vladimir N. Molotkov +* @version $Revision$ +*/ + +package org.apache.harmony.security.tests.java.security.spec; + +import java.math.BigInteger; +import java.security.spec.ECFieldF2m; +import java.security.spec.ECFieldFp; +import java.security.spec.EllipticCurve; + +import junit.framework.TestCase; + +/** + * Tests for EllipticCurve class fields and methods. + * + */ +public class EllipticCurve_ImplTest extends TestCase { + + /** + * Test #2 for equals(Object other) method
+ * Assertion: return false if this and other objects are not equal
+ * Test preconditions: see test comments
+ * Expected: all objects in this test must be NOT equal + */ + public final void testEqualsObject02() { + // test case 1: must not be equal to null + EllipticCurve c2=null, c1 = + new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), + BigInteger.ONE, + BigInteger.valueOf(19L)); + assertFalse(c1.equals(c2)); + + // test case 2: not equal objects - field + c1 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), + BigInteger.ONE, + BigInteger.valueOf(19L)); + c2 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(31L)), + BigInteger.valueOf(1L), + BigInteger.valueOf(19L)); + assertFalse(c1.equals(c2) || c2.equals(c1)); + + // test case 3: not equal objects - a + c1 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), + BigInteger.ONE, + BigInteger.valueOf(19L)); + c2 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), + BigInteger.ZERO, + BigInteger.valueOf(19L)); + assertFalse(c1.equals(c2) || c2.equals(c1)); + + // test case 4: not equal objects - b + c1 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), + BigInteger.ONE, + BigInteger.valueOf(19L)); + c2 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), + BigInteger.ONE, + BigInteger.valueOf(17L)); + assertFalse(c1.equals(c2) || c2.equals(c1)); + + // test case 5: not equal objects - both seed not null + c1 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), + BigInteger.ONE, + BigInteger.valueOf(19L), + new byte[24]); + c2 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), + BigInteger.valueOf(1L), + BigInteger.valueOf(19L), + new byte[25]); + assertFalse(c1.equals(c2) || c2.equals(c1)); + + // test case 6: not equal objects - one seed is null + c1 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), + BigInteger.ONE, + BigInteger.valueOf(19L), + null); + c2 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), + BigInteger.valueOf(1L), + BigInteger.valueOf(19L), + new byte[24]); + assertFalse(c1.equals(c2) || c2.equals(c1)); + + // test case 7: not equal objects - field class + c1 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), + BigInteger.ONE, + BigInteger.valueOf(19L), + new byte[24]); + c2 = new EllipticCurve(new ECFieldF2m(5), + BigInteger.ONE, + BigInteger.valueOf(19L), + new byte[24]); + assertFalse(c1.equals(c2) || c2.equals(c1)); + } +} Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/spec/EllipticCurve_ImplTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/pkcs10/CertificationRequestInfoTest.java ------------------------------------------------------------------------------ svn:eol-style = native Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/pkcs10/CertificationRequestTest.java URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/pkcs10/CertificationRequestTest.java?view=diff&rev=443539&r1=443538&r2=443539 ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/pkcs10/CertificationRequestTest.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/pkcs10/CertificationRequestTest.java Thu Sep 14 18:17:39 2006 @@ -1,86 +1,86 @@ -/* - * Copyright 2006 The Apache Software Foundation or its licensors, as applicable. - * - * 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. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.harmony.security.tests.pkcs10; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import junit.framework.TestCase; - -import org.apache.harmony.security.pkcs10.CertificationRequest; -import org.apache.harmony.security.pkcs10.CertificationRequestInfo; -import org.apache.harmony.security.x501.AttributeTypeAndValue; -import org.apache.harmony.security.x501.AttributeValue; -import org.apache.harmony.security.x501.Name; -import org.apache.harmony.security.x509.AlgorithmIdentifier; -import org.apache.harmony.security.x509.SubjectPublicKeyInfo; - - - -public class CertificationRequestTest extends TestCase { - - /** - * Test method for 'com.openintel.drl.security.pkcs10.CertificationRequest'. - * Creates CertificationRequest, gets its values, encodes and decodes the - * encoded form. - * - */ - public void testCertificationRequest() throws IOException { - int version = 2;// v3 - Name subject = new Name("O=subject"); - SubjectPublicKeyInfo spki = new SubjectPublicKeyInfo( - new AlgorithmIdentifier("1.2.840.113549.1.1.2"), new byte[4]); - List attributes = new ArrayList(); - // 1.2.840.113549.1.9.1 is OID of EMAILADDRESS - attributes.add(new AttributeTypeAndValue("1.2.840.113549.1.9.1", - new AttributeValue("a@b.com", false))); - CertificationRequestInfo certReqInfo = new CertificationRequestInfo( - version, subject, spki, attributes); - AlgorithmIdentifier signatureAlgId = new AlgorithmIdentifier( - "1.2.3.44.555"); - byte[] signature = { (byte) 0x01, (byte) 0x02, (byte) 0x03, - (byte) 0x04, (byte) 0x05 }; - - CertificationRequest certReq = new CertificationRequest(certReqInfo, - signatureAlgId, signature); - - // check what we have constructed - assertEquals(certReqInfo, certReq.getInfo()); - assertEquals(signatureAlgId, certReq.getAlgId()); - assertTrue(Arrays.equals(signature, certReq.getSignature())); - - // decode the encoded CSR - byte[] encoding = certReq.getEncoded(); - CertificationRequest decoded = (CertificationRequest) CertificationRequest.ASN1 - .decode(encoding); - - // check what was decoded - CertificationRequestInfo decodedCRinfo = certReq.getInfo(); - - assertEquals(certReqInfo.getSubject(), decodedCRinfo.getSubject()); - assertEquals(certReqInfo.getSubjectPublicKeyInfo(), decodedCRinfo - .getSubjectPublicKeyInfo()); - assertEquals(certReqInfo.getVersion(), decodedCRinfo.getVersion()); - assertEquals(certReqInfo.getAttributes(), decodedCRinfo.getAttributes()); - - assertEquals(certReq.getAlgId(), decoded.getAlgId()); - assertTrue(Arrays.equals(certReq.getSignature(), decoded.getSignature())); - } -} - +/* + * Copyright 2006 The Apache Software Foundation or its licensors, as applicable. + * + * 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. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.harmony.security.tests.pkcs10; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import junit.framework.TestCase; + +import org.apache.harmony.security.pkcs10.CertificationRequest; +import org.apache.harmony.security.pkcs10.CertificationRequestInfo; +import org.apache.harmony.security.x501.AttributeTypeAndValue; +import org.apache.harmony.security.x501.AttributeValue; +import org.apache.harmony.security.x501.Name; +import org.apache.harmony.security.x509.AlgorithmIdentifier; +import org.apache.harmony.security.x509.SubjectPublicKeyInfo; + + + +public class CertificationRequestTest extends TestCase { + + /** + * Test method for 'com.openintel.drl.security.pkcs10.CertificationRequest'. + * Creates CertificationRequest, gets its values, encodes and decodes the + * encoded form. + * + */ + public void testCertificationRequest() throws IOException { + int version = 2;// v3 + Name subject = new Name("O=subject"); + SubjectPublicKeyInfo spki = new SubjectPublicKeyInfo( + new AlgorithmIdentifier("1.2.840.113549.1.1.2"), new byte[4]); + List attributes = new ArrayList(); + // 1.2.840.113549.1.9.1 is OID of EMAILADDRESS + attributes.add(new AttributeTypeAndValue("1.2.840.113549.1.9.1", + new AttributeValue("a@b.com", false))); + CertificationRequestInfo certReqInfo = new CertificationRequestInfo( + version, subject, spki, attributes); + AlgorithmIdentifier signatureAlgId = new AlgorithmIdentifier( + "1.2.3.44.555"); + byte[] signature = { (byte) 0x01, (byte) 0x02, (byte) 0x03, + (byte) 0x04, (byte) 0x05 }; + + CertificationRequest certReq = new CertificationRequest(certReqInfo, + signatureAlgId, signature); + + // check what we have constructed + assertEquals(certReqInfo, certReq.getInfo()); + assertEquals(signatureAlgId, certReq.getAlgId()); + assertTrue(Arrays.equals(signature, certReq.getSignature())); + + // decode the encoded CSR + byte[] encoding = certReq.getEncoded(); + CertificationRequest decoded = (CertificationRequest) CertificationRequest.ASN1 + .decode(encoding); + + // check what was decoded + CertificationRequestInfo decodedCRinfo = certReq.getInfo(); + + assertEquals(certReqInfo.getSubject(), decodedCRinfo.getSubject()); + assertEquals(certReqInfo.getSubjectPublicKeyInfo(), decodedCRinfo + .getSubjectPublicKeyInfo()); + assertEquals(certReqInfo.getVersion(), decodedCRinfo.getVersion()); + assertEquals(certReqInfo.getAttributes(), decodedCRinfo.getAttributes()); + + assertEquals(certReq.getAlgId(), decoded.getAlgId()); + assertTrue(Arrays.equals(certReq.getSignature(), decoded.getSignature())); + } +} + Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/pkcs10/CertificationRequestTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/DRLCertFactoryTest.java ------------------------------------------------------------------------------ svn:eol-style = native Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/X509CRLEntryImplTest.java URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/X509CRLEntryImplTest.java?view=diff&rev=443539&r1=443538&r2=443539 ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/X509CRLEntryImplTest.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/X509CRLEntryImplTest.java Thu Sep 14 18:17:39 2006 @@ -1,81 +1,81 @@ -/* - * Copyright 2006 The Apache Software Foundation or its licensors, as applicable. - * - * 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. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @author Alexander Y. Kleymenov - * @version $Revision$ - */ - -package org.apache.harmony.security.tests.provider.cert; - -import java.math.BigInteger; -import java.util.Date; -import javax.security.auth.x500.X500Principal; - -import org.apache.harmony.security.provider.cert.X509CRLEntryImpl; -import org.apache.harmony.security.x509.Extension; -import org.apache.harmony.security.x509.Extensions; -import org.apache.harmony.security.x509.TBSCertList; - -import junit.framework.Test; -import junit.framework.TestCase; -import junit.framework.TestSuite; - -/** - * X509CRLEntryImplTest test - */ -public class X509CRLEntryImplTest extends TestCase { - - /** - * getExtensionValue(String oid) method testing. - */ - public void testGetExtensionValue() throws Exception { - // revoked certificate issuer - X500Principal issuer = - new X500Principal("O=Certificate Issuer"); - // revoked sertificate serial number - BigInteger serialNumber = BigInteger.valueOf(555); - // crl entry extensions - Extensions crlEntryExtensions = new Extensions(); - // add reason code extension which OID is 2.5.29.21 - // see RFC 3280 http://www.ietf.org/rfc/rfc3280.txt - crlEntryExtensions.addExtension(new Extension.ReasonCode(1)); - // crl entry - X509CRLEntryImpl crlEntry = new X509CRLEntryImpl( - new TBSCertList.RevokedCertificate( - serialNumber, - new Date(), - crlEntryExtensions - ), - issuer - ); - assertNotNull(crlEntry.getExtensionValue("2.5.29.21")); - assertNull("Null value should be returned in the case of " - + "nonexisting extension", - // demand absent Invalidity Date extension - // which OID is 2.5.29.24 (RFC 3280) - crlEntry.getExtensionValue("2.5.29.24")); - } - - public static Test suite() { - return new TestSuite(X509CRLEntryImplTest.class); - } - - public static void main(String[] args) { - junit.textui.TestRunner.run(suite()); - } -} - +/* + * Copyright 2006 The Apache Software Foundation or its licensors, as applicable. + * + * 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. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @author Alexander Y. Kleymenov + * @version $Revision$ + */ + +package org.apache.harmony.security.tests.provider.cert; + +import java.math.BigInteger; +import java.util.Date; +import javax.security.auth.x500.X500Principal; + +import org.apache.harmony.security.provider.cert.X509CRLEntryImpl; +import org.apache.harmony.security.x509.Extension; +import org.apache.harmony.security.x509.Extensions; +import org.apache.harmony.security.x509.TBSCertList; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +/** + * X509CRLEntryImplTest test + */ +public class X509CRLEntryImplTest extends TestCase { + + /** + * getExtensionValue(String oid) method testing. + */ + public void testGetExtensionValue() throws Exception { + // revoked certificate issuer + X500Principal issuer = + new X500Principal("O=Certificate Issuer"); + // revoked sertificate serial number + BigInteger serialNumber = BigInteger.valueOf(555); + // crl entry extensions + Extensions crlEntryExtensions = new Extensions(); + // add reason code extension which OID is 2.5.29.21 + // see RFC 3280 http://www.ietf.org/rfc/rfc3280.txt + crlEntryExtensions.addExtension(new Extension.ReasonCode(1)); + // crl entry + X509CRLEntryImpl crlEntry = new X509CRLEntryImpl( + new TBSCertList.RevokedCertificate( + serialNumber, + new Date(), + crlEntryExtensions + ), + issuer + ); + assertNotNull(crlEntry.getExtensionValue("2.5.29.21")); + assertNull("Null value should be returned in the case of " + + "nonexisting extension", + // demand absent Invalidity Date extension + // which OID is 2.5.29.24 (RFC 3280) + crlEntry.getExtensionValue("2.5.29.24")); + } + + public static Test suite() { + return new TestSuite(X509CRLEntryImplTest.class); + } + + public static void main(String[] args) { + junit.textui.TestRunner.run(suite()); + } +} + Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/X509CRLEntryImplTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/X509CertFactoryPerfTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/X509CertPathImplTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/x509/CertificateListTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/x509/CertificatePoliciesTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/x509/CertificateTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/x509/EDIPartyNameTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/x509/GeneralNameTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/x509/GeneralNamesTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/x509/ORAddressTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/x509/PrivateKeyUsagePeriodTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/CertificateStub.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/IdentityScopeStub.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/IdentityStub.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/KeyStoreTestSupport.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/MDGoldenData.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/MyAlgorithmParameterGeneratorSpi.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/MyAlgorithmParameters.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/MyKeyPairGenerator1.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/MyKeyPairGenerator2.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/MyKeyPairGenerator3.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/MyKeyPairGeneratorSpi.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/MyKeyStore.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/MyKeyStoreSpi.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/MyLoadStoreParams.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/MyMessageDigest1.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/MyMessageDigest2.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/MySignature1.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/MySignature2.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/PrivateKeyStub.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/PublicKeyStub.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/RandomImpl.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/SecurityChecker.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/SignerStub.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/SpiEngUtils.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/TestCertUtils.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/TestKeyPair.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/TestUtils.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/cert/MyCRL.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/cert/MyCertPath.java ------------------------------------------------------------------------------ svn:eol-style = native