Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 72415 invoked from network); 15 Sep 2006 01:20:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Sep 2006 01:20:37 -0000 Received: (qmail 65509 invoked by uid 500); 15 Sep 2006 01:20:36 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 65477 invoked by uid 500); 15 Sep 2006 01:20:36 -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 65466 invoked by uid 99); 15 Sep 2006 01:20:36 -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:36 -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:30 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 0E90B1A984D; Thu, 14 Sep 2006 18:18:52 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r443539 [29/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: <20060915011852.0E90B1A984D@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/support/common/java/org/apache/harmony/security/tests/support/cert/MyCertPathBuilderSpi.java URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/cert/MyCertPathBuilderSpi.java?view=diff&rev=443539&r1=443538&r2=443539 ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/cert/MyCertPathBuilderSpi.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/cert/MyCertPathBuilderSpi.java Thu Sep 14 18:17:39 2006 @@ -1,46 +1,46 @@ -/* - * 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 Vera Y. Petrashkova -* @version $Revision$ -*/ - -package org.apache.harmony.security.tests.support.cert; - -import java.security.InvalidAlgorithmParameterException; -import java.security.cert.CertPathBuilderException; -import java.security.cert.CertPathBuilderResult; -import java.security.cert.CertPathBuilderSpi; -import java.security.cert.CertPathParameters; - -/** - * Additional class for verification CertPathBuilderSpi - * and CertPathBuilder - - */ - -public class MyCertPathBuilderSpi extends CertPathBuilderSpi { - private int swi = 0; - public CertPathBuilderResult engineBuild(CertPathParameters params) - throws CertPathBuilderException, InvalidAlgorithmParameterException { - swi++; - if ((params == null) && ((swi %2 ) != 0)) { - throw new CertPathBuilderException("Null parameter"); - } - return null; - } +/* + * 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 Vera Y. Petrashkova +* @version $Revision$ +*/ + +package org.apache.harmony.security.tests.support.cert; + +import java.security.InvalidAlgorithmParameterException; +import java.security.cert.CertPathBuilderException; +import java.security.cert.CertPathBuilderResult; +import java.security.cert.CertPathBuilderSpi; +import java.security.cert.CertPathParameters; + +/** + * Additional class for verification CertPathBuilderSpi + * and CertPathBuilder + + */ + +public class MyCertPathBuilderSpi extends CertPathBuilderSpi { + private int swi = 0; + public CertPathBuilderResult engineBuild(CertPathParameters params) + throws CertPathBuilderException, InvalidAlgorithmParameterException { + swi++; + if ((params == null) && ((swi %2 ) != 0)) { + throw new CertPathBuilderException("Null parameter"); + } + return null; + } } Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/cert/MyCertPathBuilderSpi.java ------------------------------------------------------------------------------ svn:eol-style = native Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/cert/MyCertPathValidatorSpi.java URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/cert/MyCertPathValidatorSpi.java?view=diff&rev=443539&r1=443538&r2=443539 ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/cert/MyCertPathValidatorSpi.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/cert/MyCertPathValidatorSpi.java Thu Sep 14 18:17:39 2006 @@ -1,55 +1,55 @@ -/* - * 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 Vera Y. Petrashkova -* @version $Revision$ -*/ - -package org.apache.harmony.security.tests.support.cert; - -import java.security.InvalidAlgorithmParameterException; -import java.security.cert.CertPath; -import java.security.cert.CertPathParameters; -import java.security.cert.CertPathValidatorException; -import java.security.cert.CertPathValidatorResult; -import java.security.cert.CertPathValidatorSpi; - -/** - * Additional class for verification of CertPathValidatorSpi - * and CertPathValidator - * - */ - -public class MyCertPathValidatorSpi extends CertPathValidatorSpi { - private int sw = 0; - public CertPathValidatorResult engineValidate(CertPath certPath, - CertPathParameters params) throws CertPathValidatorException, - InvalidAlgorithmParameterException { - ++sw; - if (certPath == null) { - if ((sw % 2) == 0) { - throw new CertPathValidatorException("certPath null"); - } - } - if (params == null) { - if ((sw % 3) == 0) { - throw new InvalidAlgorithmParameterException("params null"); - } - } - return null; - } -} +/* + * 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 Vera Y. Petrashkova +* @version $Revision$ +*/ + +package org.apache.harmony.security.tests.support.cert; + +import java.security.InvalidAlgorithmParameterException; +import java.security.cert.CertPath; +import java.security.cert.CertPathParameters; +import java.security.cert.CertPathValidatorException; +import java.security.cert.CertPathValidatorResult; +import java.security.cert.CertPathValidatorSpi; + +/** + * Additional class for verification of CertPathValidatorSpi + * and CertPathValidator + * + */ + +public class MyCertPathValidatorSpi extends CertPathValidatorSpi { + private int sw = 0; + public CertPathValidatorResult engineValidate(CertPath certPath, + CertPathParameters params) throws CertPathValidatorException, + InvalidAlgorithmParameterException { + ++sw; + if (certPath == null) { + if ((sw % 2) == 0) { + throw new CertPathValidatorException("certPath null"); + } + } + if (params == null) { + if ((sw % 3) == 0) { + throw new InvalidAlgorithmParameterException("params null"); + } + } + return null; + } +} Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/cert/MyCertPathValidatorSpi.java ------------------------------------------------------------------------------ svn:eol-style = native Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/cert/MyCertStoreParameters.java URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/cert/MyCertStoreParameters.java?view=diff&rev=443539&r1=443538&r2=443539 ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/cert/MyCertStoreParameters.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/cert/MyCertStoreParameters.java Thu Sep 14 18:17:39 2006 @@ -1,42 +1,42 @@ -/* - * 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 Vera Y. Petrashkova -* @version $Revision$ -*/ - -package org.apache.harmony.security.tests.support.cert; - -import java.security.cert.CertStoreParameters; - -/** - * Class for verification of CertStore and CertStoreSpi - * - */ - -public class MyCertStoreParameters implements CertStoreParameters { - public MyCertStoreParameters() { - super(); - } - public Object clone() { - try { - return super.clone(); - } catch (CloneNotSupportedException e) { - return null; - } - } -} +/* + * 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 Vera Y. Petrashkova +* @version $Revision$ +*/ + +package org.apache.harmony.security.tests.support.cert; + +import java.security.cert.CertStoreParameters; + +/** + * Class for verification of CertStore and CertStoreSpi + * + */ + +public class MyCertStoreParameters implements CertStoreParameters { + public MyCertStoreParameters() { + super(); + } + public Object clone() { + try { + return super.clone(); + } catch (CloneNotSupportedException e) { + return null; + } + } +} Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/cert/MyCertStoreParameters.java ------------------------------------------------------------------------------ svn:eol-style = native Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/cert/MyCertStoreSpi.java URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/cert/MyCertStoreSpi.java?view=diff&rev=443539&r1=443538&r2=443539 ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/cert/MyCertStoreSpi.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/cert/MyCertStoreSpi.java Thu Sep 14 18:17:39 2006 @@ -1,63 +1,63 @@ -/* - * 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 Vera Y. Petrashkova -* @version $Revision$ -*/ - -package org.apache.harmony.security.tests.support.cert; - -import java.security.InvalidAlgorithmParameterException; -import java.security.cert.CRLSelector; -import java.security.cert.CertSelector; -import java.security.cert.CertStoreException; -import java.security.cert.CertStoreParameters; -import java.security.cert.CertStoreSpi; -import java.util.Collection; - -/** - * Additional class for verification CertStoreSpi - * and CertStore - * - */ - -public class MyCertStoreSpi extends CertStoreSpi { - - public MyCertStoreSpi(CertStoreParameters params) - throws InvalidAlgorithmParameterException { - super(params); - if (!(params instanceof MyCertStoreParameters)) { - throw new InvalidAlgorithmParameterException("Invalid params"); - } - } - - public Collection engineGetCertificates(CertSelector selector) - throws CertStoreException { - if (selector == null) { - throw new CertStoreException("Parameter is null"); - } - return null; - } - - public Collection engineGetCRLs(CRLSelector selector) - throws CertStoreException { - if (selector == null) { - throw new CertStoreException("Parameter is null"); - } - return null; - } -} +/* + * 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 Vera Y. Petrashkova +* @version $Revision$ +*/ + +package org.apache.harmony.security.tests.support.cert; + +import java.security.InvalidAlgorithmParameterException; +import java.security.cert.CRLSelector; +import java.security.cert.CertSelector; +import java.security.cert.CertStoreException; +import java.security.cert.CertStoreParameters; +import java.security.cert.CertStoreSpi; +import java.util.Collection; + +/** + * Additional class for verification CertStoreSpi + * and CertStore + * + */ + +public class MyCertStoreSpi extends CertStoreSpi { + + public MyCertStoreSpi(CertStoreParameters params) + throws InvalidAlgorithmParameterException { + super(params); + if (!(params instanceof MyCertStoreParameters)) { + throw new InvalidAlgorithmParameterException("Invalid params"); + } + } + + public Collection engineGetCertificates(CertSelector selector) + throws CertStoreException { + if (selector == null) { + throw new CertStoreException("Parameter is null"); + } + return null; + } + + public Collection engineGetCRLs(CRLSelector selector) + throws CertStoreException { + if (selector == null) { + throw new CertStoreException("Parameter is null"); + } + return null; + } +} Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/cert/MyCertStoreSpi.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/MyCertificate.java ------------------------------------------------------------------------------ svn:eol-style = native Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/cert/MyCertificateFactorySpi.java URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/cert/MyCertificateFactorySpi.java?view=diff&rev=443539&r1=443538&r2=443539 ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/cert/MyCertificateFactorySpi.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/cert/MyCertificateFactorySpi.java Thu Sep 14 18:17:39 2006 @@ -1,137 +1,137 @@ -/* - * 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 Vera Y. Petrashkova -* @version $Revision$ -*/ - -package org.apache.harmony.security.tests.support.cert; - -import java.io.DataInputStream; -import java.io.InputStream; -import java.security.cert.CRL; -import java.security.cert.CRLException; -import java.security.cert.CertPath; -import java.security.cert.Certificate; -import java.security.cert.CertificateException; -import java.security.cert.CertificateFactorySpi; -import java.util.Collection; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Set; - -/** - * Additional class for verification CertificateFactorySpi and - * CertificateFactory classes - * - */ - -public class MyCertificateFactorySpi extends CertificateFactorySpi { - // Variants of execution: - // mode: false - list of encodings is empty - // mode: true - list of encodings consists of 2 elements - // some exceptions are thrown when - private static boolean mode; - - private Set list; - - public MyCertificateFactorySpi() { - super(); - mode = true; - list = new HashSet(); - list.add("aa"); - list.add("bb"); - } - - public static void putMode(boolean newMode) { - mode = newMode; - } - - public Certificate engineGenerateCertificate(InputStream inStream) - throws CertificateException { - if (!(inStream instanceof DataInputStream)) { - throw new CertificateException("Incorrect inputstream"); - } - return null; - } - - public Collection engineGenerateCertificates(InputStream inStream) - throws CertificateException { - if (!(inStream instanceof DataInputStream)) { - throw new CertificateException("Incorrect inputstream"); - } - return null; - } - - public CRL engineGenerateCRL(InputStream inStream) throws CRLException { - if (!(inStream instanceof DataInputStream)) { - throw new CRLException("Incorrect inputstream"); - } - return null; - } - - public Collection engineGenerateCRLs(InputStream inStream) - throws CRLException { - if (!(inStream instanceof DataInputStream)) { - throw new CRLException("Incorrect inputstream"); - } - return null; - } - - public CertPath engineGenerateCertPath(InputStream inStream) - throws CertificateException { - if (!(inStream instanceof DataInputStream)) { - throw new CertificateException("Incorrect inputstream"); - } - Iterator it = engineGetCertPathEncodings(); - if (!it.hasNext()) { - throw new CertificateException("There are no CertPath encodings"); - } - return engineGenerateCertPath(inStream, (String) it.next()); - } - - public CertPath engineGenerateCertPath(InputStream inStream, String encoding) - throws CertificateException { - if (!(inStream instanceof DataInputStream)) { - throw new CertificateException("Incorrect inputstream"); - } - if (encoding.length() == 0) { - if (mode) { - throw new IllegalArgumentException("Encoding is empty"); - } - } - return null; - } - - public CertPath engineGenerateCertPath(List certificates) - throws CertificateException { - if (certificates == null) { - if (mode) { - throw new NullPointerException("certificates is null"); - } - } - return null; - } - - public Iterator engineGetCertPathEncodings() { - if (!mode) { - list.clear(); - } - return list.iterator(); - } +/* + * 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 Vera Y. Petrashkova +* @version $Revision$ +*/ + +package org.apache.harmony.security.tests.support.cert; + +import java.io.DataInputStream; +import java.io.InputStream; +import java.security.cert.CRL; +import java.security.cert.CRLException; +import java.security.cert.CertPath; +import java.security.cert.Certificate; +import java.security.cert.CertificateException; +import java.security.cert.CertificateFactorySpi; +import java.util.Collection; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Set; + +/** + * Additional class for verification CertificateFactorySpi and + * CertificateFactory classes + * + */ + +public class MyCertificateFactorySpi extends CertificateFactorySpi { + // Variants of execution: + // mode: false - list of encodings is empty + // mode: true - list of encodings consists of 2 elements + // some exceptions are thrown when + private static boolean mode; + + private Set list; + + public MyCertificateFactorySpi() { + super(); + mode = true; + list = new HashSet(); + list.add("aa"); + list.add("bb"); + } + + public static void putMode(boolean newMode) { + mode = newMode; + } + + public Certificate engineGenerateCertificate(InputStream inStream) + throws CertificateException { + if (!(inStream instanceof DataInputStream)) { + throw new CertificateException("Incorrect inputstream"); + } + return null; + } + + public Collection engineGenerateCertificates(InputStream inStream) + throws CertificateException { + if (!(inStream instanceof DataInputStream)) { + throw new CertificateException("Incorrect inputstream"); + } + return null; + } + + public CRL engineGenerateCRL(InputStream inStream) throws CRLException { + if (!(inStream instanceof DataInputStream)) { + throw new CRLException("Incorrect inputstream"); + } + return null; + } + + public Collection engineGenerateCRLs(InputStream inStream) + throws CRLException { + if (!(inStream instanceof DataInputStream)) { + throw new CRLException("Incorrect inputstream"); + } + return null; + } + + public CertPath engineGenerateCertPath(InputStream inStream) + throws CertificateException { + if (!(inStream instanceof DataInputStream)) { + throw new CertificateException("Incorrect inputstream"); + } + Iterator it = engineGetCertPathEncodings(); + if (!it.hasNext()) { + throw new CertificateException("There are no CertPath encodings"); + } + return engineGenerateCertPath(inStream, (String) it.next()); + } + + public CertPath engineGenerateCertPath(InputStream inStream, String encoding) + throws CertificateException { + if (!(inStream instanceof DataInputStream)) { + throw new CertificateException("Incorrect inputstream"); + } + if (encoding.length() == 0) { + if (mode) { + throw new IllegalArgumentException("Encoding is empty"); + } + } + return null; + } + + public CertPath engineGenerateCertPath(List certificates) + throws CertificateException { + if (certificates == null) { + if (mode) { + throw new NullPointerException("certificates is null"); + } + } + return null; + } + + public Iterator engineGetCertPathEncodings() { + if (!mode) { + list.clear(); + } + return list.iterator(); + } } Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/cert/MyCertificateFactorySpi.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/provider/cert/CertFactoryTestData.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/spec/MyEncodedKeySpec.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/tmpCallbackHandler.java ------------------------------------------------------------------------------ svn:eol-style = native