harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mloe...@apache.org
Subject svn commit: r410788 [13/13] - in /incubator/harmony/enhanced/classlib/trunk/modules: auth/make/common/ auth/src/test/java/common/javax/security/auth/ auth/src/test/java/common/javax/security/auth/callback/serialization/ auth/src/test/java/common/javax/...
Date Thu, 01 Jun 2006 08:15:44 GMT
Added: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/cert/TestUtils.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/TestUtils.java?rev=410788&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/cert/TestUtils.java
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/cert/TestUtils.java
Thu Jun  1 01:15:17 2006
@@ -0,0 +1,415 @@
+/*
+ *  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.support.cert;
+
+import java.io.BufferedInputStream;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.KeyStore;
+import java.security.NoSuchAlgorithmException;
+import java.security.cert.CertPathValidatorException;
+import java.security.cert.CertStore;
+import java.security.cert.Certificate;
+import java.security.cert.CertificateException;
+import java.security.cert.CertificateFactory;
+import java.security.cert.CollectionCertStoreParameters;
+import java.security.cert.PKIXCertPathChecker;
+import java.security.cert.PolicyNode;
+import java.security.cert.TrustAnchor;
+import java.security.cert.X509Certificate;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * java.security.cert test utilities
+ * 
+ */
+public class TestUtils {
+    // Certificate type used during testing
+    private static final String certType = "X.509";
+    // The file name to read certificate from
+    private static final String certFileName =
+        org.apache.harmony.security.tests.support.TestUtils.TEST_ROOT +
+        "java/security/cert/serialization/Certificate." + certType;
+    // Key store type used during testing
+    private static final String keyStoreType = "BKS";
+    // The file name prefix to load keystore from
+    private static final String keyStoreFileName =
+        org.apache.harmony.security.tests.support.TestUtils.TEST_ROOT +
+        "java/security/cert/serialization/test." + keyStoreType + ".ks";
+    //
+    // The file name suffixes to load keystore from
+    //  *.ks1 - keystore containing untrusted cerificates only
+    //  *.ks2 - keystore containing trusted cerificates only
+    //  *.ks3 - keystore containing both trusted and untrusted cerificates
+    //
+    public static final int UNTRUSTED = 1;
+    public static final int TRUSTED = 2;
+    public static final int TRUSTED_AND_UNTRUSTED = 3;
+    //
+    // Common passwords for all test keystores
+    //
+    private final static char[] storepass =
+        new char[] {'s','t','o','r','e','p','w','d'};
+
+    /**
+     * Creates <code>TrustAnchor</code> instance
+     * constructed using self signed test certificate
+     *
+     * @return <code>TrustAnchor</code> instance
+     * @throws CertificateException
+     * @throws FileNotFoundException
+     */
+    public static TrustAnchor getTrustAnchor() {
+        CertificateFactory cf = null;
+        try {
+            cf = CertificateFactory.getInstance(certType);
+        } catch (CertificateException e) {
+            // requested cert type is not available in the
+            // default provider package or any of the other provider packages
+            // that were searched
+            throw new RuntimeException(e);
+        }
+        BufferedInputStream bis = null;
+        try {
+            bis = new BufferedInputStream(new FileInputStream(certFileName));
+            X509Certificate c1 = (X509Certificate)cf.generateCertificate(bis);
+
+            return new TrustAnchor(c1, null);
+        } catch (Exception e) {
+            // all failures are fatal
+            throw new RuntimeException(e);
+        } finally {
+            if (bis != null) {
+                try {
+                    bis.close() ;
+                } catch (IOException ign) {}
+            }
+        }
+    }
+
+    /**
+     * Creates <code>Set</code> of <code>TrustAnchor</code>s
+     * containing single element (self signed test certificate).
+     * @return Returns <code>Set</code> of <code>TrustAnchor</code>s
+     */
+    public static Set getTrustAnchorSet() {
+        TrustAnchor ta = getTrustAnchor();
+        if (ta == null) {
+            return null;
+        }
+        HashSet set = new HashSet();
+        if (!set.add(ta)) {
+            throw new RuntimeException("Could not create trust anchor set");
+        }
+        return set;
+    }
+
+    /**
+     * Creates test <code>KeyStore</code> instance
+     * 
+     * @param initialize
+     *  Do not initialize returned <code>KeyStore</code> if false
+     * 
+     * @param testKeyStoreType 
+     *  this parameter ignored if <code>initialize</code> is false;
+     *  The following types supported:<br>
+     *  1 - <code>KeyStore</code> with untrusted certificates only<br>
+     *  2 - <code>KeyStore</code> with trusted certificates only<br>
+     *  3 - <code>KeyStore</code> with botht trusted and untrusted certificates
+     * 
+     * @return Returns test <code>KeyStore</code> instance
+     */
+    public static KeyStore getKeyStore(boolean initialize,
+            int testKeyStoreType) {
+        BufferedInputStream bis = null;
+        try {
+            KeyStore ks = KeyStore.getInstance(keyStoreType);
+            if (initialize) {
+                String fileName = keyStoreFileName + testKeyStoreType;
+                bis = new BufferedInputStream(
+                            new FileInputStream(fileName));
+                ks.load(bis, storepass);
+            }
+            return ks;
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        } finally {
+            if (initialize && bis != null) {
+                try {
+                    bis.close();
+                } catch (IOException ign) {}
+            }
+        }
+    }
+
+    /**
+     * Creates <code>List</code> of <code>CollectionCertStores</code>
+     *
+     * @return The list created
+     * 
+     * @throws InvalidAlgorithmParameterException
+     * @throws NoSuchAlgorithmException
+     */
+    public static List getCollectionCertStoresList()
+        throws InvalidAlgorithmParameterException,
+               NoSuchAlgorithmException {
+        CertStore cs = CertStore.getInstance("Collection",
+                new CollectionCertStoreParameters());
+        ArrayList l = new ArrayList();
+        if (!l.add(cs)) {
+            throw new RuntimeException("Could not create cert stores list");
+        }
+        return l;
+    }
+
+    /**
+     * Creates stub implementation of the <code>PKIXCertPathChecker</code>
+     *
+     * @return Stub implementation of the <code>PKIXCertPathChecker</code>
+     */
+    public static PKIXCertPathChecker getTestCertPathChecker() {
+        // stub implementation for testing purposes only
+        return new PKIXCertPathChecker() {
+            private boolean forward = false;
+
+            public void check(Certificate arg0, Collection arg1)
+                    throws CertPathValidatorException {
+            }
+
+            public Set getSupportedExtensions() {
+                return null;
+            }
+
+            public void init(boolean arg0) throws CertPathValidatorException {
+                forward = arg0;
+            }
+
+            public boolean isForwardCheckingSupported() {
+                // just to check this checker state
+                return forward;
+            }
+        };
+    }
+
+    /**
+     * Creates policy tree stub containing two <code>PolicyNode</code>s
+     * for testing purposes
+     *
+     * @return root <code>PolicyNode</code> of the policy tree
+     */
+    public static PolicyNode getPolicyTree() {
+        return new PolicyNode() {
+            final PolicyNode parent = this;
+            public int getDepth() {
+                // parent
+                return 0;
+            }
+
+            public boolean isCritical() {
+                return false;
+            }
+
+            public String getValidPolicy() {
+                return null;
+            }
+
+            public PolicyNode getParent() {
+                return null;
+            }
+
+            public Iterator getChildren() {
+                PolicyNode child = new PolicyNode() {
+                    public int getDepth() {
+                        // child
+                        return 1;
+                    }
+
+                    public boolean isCritical() {
+                        return false;
+                    }
+
+                    public String getValidPolicy() {
+                        return null;
+                    }
+
+                    public PolicyNode getParent() {
+                        return parent;
+                    }
+
+                    public Iterator getChildren() {
+                        return null;
+                    }
+
+                    public Set getExpectedPolicies() {
+                        return null;
+                    }
+
+                    public Set getPolicyQualifiers() {
+                        return null;
+                    }
+                };
+                HashSet s = new HashSet();
+                s.add(child);
+                return s.iterator();
+            }
+
+            public Set getExpectedPolicies() {
+                return null;
+            }
+
+            public Set getPolicyQualifiers() {
+                return null;
+            }
+        };
+    }
+    
+    /**
+     * Returns X.509 certificate encoding corresponding to version v1.
+     * 
+     * Certificate encoding was created by hands according to X.509 Certificate
+     * ASN.1 notation. The certificate encoding has the following encoded
+     * field values:<br> 
+     * - version: 1<br>
+     * - serialNumber: 5<br>
+     * - issuer: CN=Z<br>
+     * - notBefore: 13 Dec 1999 14:15:16<br>
+     * - notAfter: 01 Jan 2000 00:00:00<br>
+     * - subject: CN=Y<br>
+     * 
+     * @return X.509 certificate encoding corresponding to version v1.
+     */
+    public static byte[] getX509Certificate_v1() {
+        return new byte[] {
+        // Certificate: SEQUENCE
+            0x30, 0x6B,
+
+            //
+            // TBSCertificate: SEQUENCE {
+            //
+            0x30, 0x5C,
+
+            // version: [0] EXPLICIT Version DEFAULT v1
+            (byte) 0xA0, 0x03, 0x02, 0x01, 0x00,
+
+            // serialNumber: CertificateSerialNumber
+            0x02, 0x01, 0x05,
+
+            // signature: AlgorithmIdentifier
+            0x30, 0x07, // SEQUENCE
+            0x06, 0x02, 0x03, 0x05,//OID
+            0x01, 0x01, 0x07, //ANY
+
+            //issuer: Name
+            0x30, 0x0C, 0x31, 0x0A, 0x30, 0x08, 0x06, 0x03, 0x55, 0x04, 0x03,
+            0x13, 0x01, 0x5A, // CN=Z
+
+            //validity: Validity
+            0x30, 0x1E, // SEQUENCE
+            // notBefore: UTCTime
+            0x17, 0x0D, 0x39, 0x39, 0x31, 0x32, 0x31, 0x33, 0x31, 0x34, 0x31,
+            0x35, 0x31, 0x36, 0x5A, // 13 Dec 1999 14:15:16
+            // notAfter:  UTCTime
+            0x17, 0x0D, 0x30, 0x30, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30,
+            0x30, 0x30, 0x30, 0x5A, // 01 Jan 2000 00:00:00
+
+            //subject: Name
+            0x30, 0x0C, 0x31, 0x0A, 0x30, 0x08, 0x06, 0x03, 0x55, 0x04, 0x03,
+            0x13, 0x01, 0x59, // CN=Y
+            //SubjectPublicKeyInfo  ::=  SEQUENCE  {
+            //    algorithm            AlgorithmIdentifier,
+            //    subjectPublicKey     BIT STRING  }
+            0x30, 0x0D, // SEQUENCE
+            0x30, 0x07, // SEQUENCE
+            0x06, 0x02, 0x03, 0x05,//OID
+            0x01, 0x01, 0x07, //ANY
+            0x03, 0x02, 0x00, 0x01, // subjectPublicKey
+
+            // issuerUniqueID - missed
+            // subjectUniqueID - missed
+            // extensions - missed
+
+            // } end TBSCertificate
+
+            //
+            // signatureAlgorithm: AlgorithmIdentifier
+            //
+            0x30, 0x07, // SEQUENCE
+            0x06, 0x02, 0x03, 0x05,//OID
+            0x01, 0x01, 0x07, //ANY
+
+            //
+            // signature: BIT STRING  
+            //
+            0x03, 0x02, 0x00, 0x01 };
+    }
+    
+    /**
+     * Returns X.509 CRL encoding corresponding to version v1.
+     * 
+     * CRL encoding was created by hands according to X.509 CRL ASN.1
+     * notation. The CRL encoding has the following encoded field values:<br> 
+     * - version: 1<br>
+     * - issuer: CN=Z<br>
+     * - thisUpdate: 01 Jan 2001 01:02:03<br>
+     * 
+     * @return X.509 CRL encoding corresponding to version v1.
+     */
+    public static byte[] getX509CRL_v1() {
+        return new byte[] {
+                //CertificateList: SEQUENCE
+                0x30, 0x35, 
+                
+                // TBSCertList: SEQUENCE  
+                0x30, 0x27,
+                // Version: INTEGER OPTIONAL
+                // 0x02, 0x01, 0x01, - missed here cause it is v1
+                // signature: AlgorithmIdentifier
+                0x30, 0x06, // SEQUENCE
+                0x06, 0x01, 0x01, // OID
+                0x01, 0x01, 0x11, // ANY
+                // issuer: Name                   
+                0x30, 0x0C, 0x31, 0x0A, 0x30, 0x08, 0x06, 0x03, 0x55, 0x04,
+                0x03, 0x13, 0x01, 0x5A, // CN=Z 
+                // thisUpdate: ChoiceOfTime
+                // GeneralizedTime: 01 Jan 2001 01:02:03
+                0x18, 0x0F, 0x32, 0x30, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31,
+                0x30, 0x31, 0x30, 0x32, 0x30, 0x33, 0x5A,
+                
+                // nextUpdate - missed
+                // revokedCertificates - missed
+                // crlExtensions - missed
+                
+                // signatureAlgorithm: AlgorithmIdentifier
+                0x30, 0x06, // SEQUENCE
+                0x06, 0x01, 0x01, //OID
+                0x01, 0x01, 0x11, //ANY
+                // signature: BIT STRING  
+                0x03, 0x02, 0x00, 0x01 };
+    }
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/provider/cert/CertFactoryTestData.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/provider/cert/CertFactoryTestData.java?rev=410788&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/provider/cert/CertFactoryTestData.java
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/provider/cert/CertFactoryTestData.java
Thu Jun  1 01:15:17 2006
@@ -0,0 +1,319 @@
+/*
+ *  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 Alexander Y. Kleymenov
+* @version $Revision$
+*/
+
+package org.apache.harmony.security.tests.support.provider.cert;
+
+import org.apache.harmony.luni.util.Base64;
+
+/**
+ * Class contains the base 64 encodings of X.509 certificates,
+ * CRLs, and Certification Paths. 
+ */
+public class CertFactoryTestData {
+
+    // All the testing data was generated by using of classes 
+    // from org.apache.harmony.security.asn1 package and encoded
+    // by org.apache.harmony.misc.Base64 class.
+
+    private static String certPathPKCS7Base64 = 
+        "MIIJXQYJKoZIhvcNAQcCoIIJTjCCCUoCAQExADALBgkqhkiG9w" +
+        "0BBwGgggkyMIIElTCCBFKgAwIBAgICAiswDAYHKoZIzjgEAwEB" +
+        "ADAdMRswGQYDVQQKExJDZXJ0aWZpY2F0ZSBJc3N1ZXIwHhcNNz" +
+        "AwMTEyMTM0NjQwWhcNNzAwMTI0MDMzMzIwWjAfMR0wGwYDVQQK" +
+        "ExRTdWJqZWN0IE9yZ2FuaXphdGlvbjCCAbcwggEsBgcqhkjOOA" +
+        "QBMIIBHwKBgQD9f1OBHXUSKVLfSpwu7OTn9hG3UjzvRADDHj+A" +
+        "tlEmaUVdQCJR+1k9jVj6v8X1ujD2y5tVbNeBO4AdNG/yZmC3a5" +
+        "lQpaSfn+gEexAiwk+7qdf+t8Yb+DtX58aophUPBPuD9tPFHsMC" +
+        "NVQTWhaRMvZ1864rYdcq7/IiAxmd0UgBxwIVAJdgUI8VIwvMsp" +
+        "K5gqLrhAvwWBz1AoGBAPfhoIXWmz3ey7yrXDa4V7l5lK+7+jrq" +
+        "gvlXTAs9B4JnUVlXjrrUWU/mcQcQgYC0SRZxI+hMKBYTt88JMo" +
+        "zIpuE8FnqLVHyNKOCjrh4rs6Z1kW6jfwv6ITVi8ftiegEkO8yk" +
+        "8b6oUZCJqIPf4VrlnwaSi2ZegHtVJWQBTDv+z0kqA4GEAAKBgB" +
+        "DIG+uTY/ABkBHadFyFnYoqaxprR5U6bZVMPmCBdnxh1dGmiah6" +
+        "x2f+lmvEyPha1oNkdesDIBNId1Akkt/sQnCA6C9q038VyfmMPb" +
+        "6khvtlZ9mCEiV4D72zieYhbiHzBmJsPKC8JQ/xFJwSU0e//2bl" +
+        "uF+UGjbA4/WMLi3+Vf9hgQIAqoICAFWjggIUMIICEDAPBgNVHQ" +
+        "8BAf8EBQMDAaqAMBIGA1UdEwEB/wQIMAYBAf8CAQUwFAYDVR0g" +
+        "AQH/BAowCDAGBgRVHSAAMGcGA1UdEQEB/wRdMFuBDHJmY0A4Mj" +
+        "IuTmFtZYIHZE5TTmFtZaQXMRUwEwYDVQQKEwxPcmdhbml6YXRp" +
+        "b26GGmh0dHA6Ly91bmlmb3JtLlJlc291cmNlLklkhwT///8AiA" +
+        "cqA6Jcg7IDMAwGA1UdHgEB/wQCMAAwDAYDVR0kAQH/BAIwADCB" +
+        "mQYDVR0lAQH/BIGOMIGLBgRVHSUABggrBgEFBQcDAQYIKwYBBQ" +
+        "UHAwEGCCsGAQUFBwMCBggrBgEFBQcDAwYIKwYBBQUHAwQGCCsG" +
+        "AQUFBwMFBggrBgEFBQcDBgYIKwYBBQUHAwcGCCsGAQUFBwMIBg" +
+        "grBgEFBQcDCQYIKwYBBQUIAgIGCisGAQQBgjcKAwMGCWCGSAGG" +
+        "+EIEATANBgNVHTYBAf8EAwIBATAOBgQqTYYJAQH/BAMBAQEwZA" +
+        "YDVR0SBF0wW4EMcmZjQDgyMi5OYW1lggdkTlNOYW1lpBcxFTAT" +
+        "BgNVBAoTDE9yZ2FuaXphdGlvboYaaHR0cDovL3VuaWZvcm0uUm" +
+        "Vzb3VyY2UuSWSHBP///wCIByoDolyDsgMwCQYDVR0fBAIwADAK" +
+        "BgNVHSMEAwEBATAKBgNVHQ4EAwEBATAKBgNVHSEEAwEBATAMBg" +
+        "cqhkjOOAQDAQEAAy8AMCwCFDTTeOfOqTwbBYYP3bPIKY6ctqxb" +
+        "AhQq7Qv07HsN3LJQCUPoQdMTx6GjyDCCBJUwggRSoAMCAQICAg" +
+        "IrMAwGByqGSM44BAMBAQAwHTEbMBkGA1UEChMSQ2VydGlmaWNh" +
+        "dGUgSXNzdWVyMB4XDTcwMDExMjEzNDY0MFoXDTcwMDEyNDAzMz" +
+        "MyMFowHzEdMBsGA1UEChMUU3ViamVjdCBPcmdhbml6YXRpb24w" +
+        "ggG3MIIBLAYHKoZIzjgEATCCAR8CgYEA/X9TgR11EilS30qcLu" +
+        "zk5/YRt1I870QAwx4/gLZRJmlFXUAiUftZPY1Y+r/F9bow9sub" +
+        "VWzXgTuAHTRv8mZgt2uZUKWkn5/oBHsQIsJPu6nX/rfGG/g7V+" +
+        "fGqKYVDwT7g/bTxR7DAjVUE1oWkTL2dfOuK2HXKu/yIgMZndFI" +
+        "AccCFQCXYFCPFSMLzLKSuYKi64QL8Fgc9QKBgQD34aCF1ps93s" +
+        "u8q1w2uFe5eZSvu/o66oL5V0wLPQeCZ1FZV4661FlP5nEHEIGA" +
+        "tEkWcSPoTCgWE7fPCTKMyKbhPBZ6i1R8jSjgo64eK7OmdZFuo3" +
+        "8L+iE1YvH7YnoBJDvMpPG+qFGQiaiD3+Fa5Z8GkotmXoB7VSVk" +
+        "AUw7/s9JKgOBhAACgYAQyBvrk2PwAZAR2nRchZ2KKmsaa0eVOm" +
+        "2VTD5ggXZ8YdXRpomoesdn/pZrxMj4WtaDZHXrAyATSHdQJJLf" +
+        "7EJwgOgvatN/Fcn5jD2+pIb7ZWfZghIleA+9s4nmIW4h8wZibD" +
+        "ygvCUP8RScElNHv/9m5bhflBo2wOP1jC4t/lX/YYECAKqCAgBV" +
+        "o4ICFDCCAhAwDwYDVR0PAQH/BAUDAwGqgDASBgNVHRMBAf8ECD" +
+        "AGAQH/AgEFMBQGA1UdIAEB/wQKMAgwBgYEVR0gADBnBgNVHREB" +
+        "Af8EXTBbgQxyZmNAODIyLk5hbWWCB2ROU05hbWWkFzEVMBMGA1" +
+        "UEChMMT3JnYW5pemF0aW9uhhpodHRwOi8vdW5pZm9ybS5SZXNv" +
+        "dXJjZS5JZIcE////AIgHKgOiXIOyAzAMBgNVHR4BAf8EAjAAMA" +
+        "wGA1UdJAEB/wQCMAAwgZkGA1UdJQEB/wSBjjCBiwYEVR0lAAYI" +
+        "KwYBBQUHAwEGCCsGAQUFBwMBBggrBgEFBQcDAgYIKwYBBQUHAw" +
+        "MGCCsGAQUFBwMEBggrBgEFBQcDBQYIKwYBBQUHAwYGCCsGAQUF" +
+        "BwMHBggrBgEFBQcDCAYIKwYBBQUHAwkGCCsGAQUFCAICBgorBg" +
+        "EEAYI3CgMDBglghkgBhvhCBAEwDQYDVR02AQH/BAMCAQEwDgYE" +
+        "Kk2GCQEB/wQDAQEBMGQGA1UdEgRdMFuBDHJmY0A4MjIuTmFtZY" +
+        "IHZE5TTmFtZaQXMRUwEwYDVQQKEwxPcmdhbml6YXRpb26GGmh0" +
+        "dHA6Ly91bmlmb3JtLlJlc291cmNlLklkhwT///8AiAcqA6Jcg7" +
+        "IDMAkGA1UdHwQCMAAwCgYDVR0jBAMBAQEwCgYDVR0OBAMBAQEw" +
+        "CgYDVR0hBAMBAQEwDAYHKoZIzjgEAwEBAAMvADAsAhQ003jnzq" +
+        "k8GwWGD92zyCmOnLasWwIUKu0L9Ox7DdyyUAlD6EHTE8eho8gx" +
+        "AA==";
+
+    private static String certPathPkiPathBase64 = 
+        "MIIJNjCCBJcwggRToAMCAQICAgIrMAwGByqGSM44BAMBAQAwHT" +
+        "EbMBkGA1UEChMSQ2VydGlmaWNhdGUgSXNzdWVyMB4XDTcwMDEx" +
+        "MjEzNDY0MFoXDTcwMDEyNDAzMzMyMFowHzEdMBsGA1UEChMUU3" +
+        "ViamVjdCBPcmdhbml6YXRpb24wggG4MIIBLAYHKoZIzjgEATCC" +
+        "AR8CgYEA/X9TgR11EilS30qcLuzk5/YRt1I870QAwx4/gLZRJm" +
+        "lFXUAiUftZPY1Y+r/F9bow9subVWzXgTuAHTRv8mZgt2uZUKWk" +
+        "n5/oBHsQIsJPu6nX/rfGG/g7V+fGqKYVDwT7g/bTxR7DAjVUE1" +
+        "oWkTL2dfOuK2HXKu/yIgMZndFIAccCFQCXYFCPFSMLzLKSuYKi" +
+        "64QL8Fgc9QKBgQD34aCF1ps93su8q1w2uFe5eZSvu/o66oL5V0" +
+        "wLPQeCZ1FZV4661FlP5nEHEIGAtEkWcSPoTCgWE7fPCTKMyKbh" +
+        "PBZ6i1R8jSjgo64eK7OmdZFuo38L+iE1YvH7YnoBJDvMpPG+qF" +
+        "GQiaiD3+Fa5Z8GkotmXoB7VSVkAUw7/s9JKgOBhQACgYEAzhsi" +
+        "Nfq3U9RAWhut8YDmRbHJTXMHTytGsK0iRZqg47JllyWbHwSmS8" +
+        "T2k4Dk4FYxQzxgOxW/PbZ5c06P9BYPlazQTcPIwAWSlKTaoTfn" +
+        "WzHnp75hbbPc8HmrSIEHVPr5hHS0DQl5Fu45b5U2KG5cx2Bb3l" +
+        "k17n0y/RqFXFYTv+OBAgCqggIAVaOCAhQwggIQMA8GA1UdDwEB" +
+        "/wQFAwMBqoAwEgYDVR0TAQH/BAgwBgEB/wIBBTAUBgNVHSABAf" +
+        "8ECjAIMAYGBFUdIAAwZwYDVR0RAQH/BF0wW4EMcmZjQDgyMi5O" +
+        "YW1lggdkTlNOYW1lpBcxFTATBgNVBAoTDE9yZ2FuaXphdGlvbo" +
+        "YaaHR0cDovL3VuaWZvcm0uUmVzb3VyY2UuSWSHBP///wCIByoD" +
+        "olyDsgMwDAYDVR0eAQH/BAIwADAMBgNVHSQBAf8EAjAAMIGZBg" +
+        "NVHSUBAf8EgY4wgYsGBFUdJQAGCCsGAQUFBwMBBggrBgEFBQcD" +
+        "AQYIKwYBBQUHAwIGCCsGAQUFBwMDBggrBgEFBQcDBAYIKwYBBQ" +
+        "UHAwUGCCsGAQUFBwMGBggrBgEFBQcDBwYIKwYBBQUHAwgGCCsG" +
+        "AQUFBwMJBggrBgEFBQgCAgYKKwYBBAGCNwoDAwYJYIZIAYb4Qg" +
+        "QBMA0GA1UdNgEB/wQDAgEBMA4GBCpNhgkBAf8EAwEBATBkBgNV" +
+        "HRIEXTBbgQxyZmNAODIyLk5hbWWCB2ROU05hbWWkFzEVMBMGA1" +
+        "UEChMMT3JnYW5pemF0aW9uhhpodHRwOi8vdW5pZm9ybS5SZXNv" +
+        "dXJjZS5JZIcE////AIgHKgOiXIOyAzAJBgNVHR8EAjAAMAoGA1" +
+        "UdIwQDAQEBMAoGA1UdDgQDAQEBMAoGA1UdIQQDAQEBMAwGByqG" +
+        "SM44BAMBAQADMAAwLQIVAIu6VjdQkOyX3jwUCvZk7i8ascXxAh" +
+        "Qb4oUMkiRQ1/ThtGvgtiuQUzHBZDCCBJcwggRToAMCAQICAgIr" +
+        "MAwGByqGSM44BAMBAQAwHTEbMBkGA1UEChMSQ2VydGlmaWNhdG" +
+        "UgSXNzdWVyMB4XDTcwMDExMjEzNDY0MFoXDTcwMDEyNDAzMzMy" +
+        "MFowHzEdMBsGA1UEChMUU3ViamVjdCBPcmdhbml6YXRpb24wgg" +
+        "G4MIIBLAYHKoZIzjgEATCCAR8CgYEA/X9TgR11EilS30qcLuzk" +
+        "5/YRt1I870QAwx4/gLZRJmlFXUAiUftZPY1Y+r/F9bow9subVW" +
+        "zXgTuAHTRv8mZgt2uZUKWkn5/oBHsQIsJPu6nX/rfGG/g7V+fG" +
+        "qKYVDwT7g/bTxR7DAjVUE1oWkTL2dfOuK2HXKu/yIgMZndFIAc" +
+        "cCFQCXYFCPFSMLzLKSuYKi64QL8Fgc9QKBgQD34aCF1ps93su8" +
+        "q1w2uFe5eZSvu/o66oL5V0wLPQeCZ1FZV4661FlP5nEHEIGAtE" +
+        "kWcSPoTCgWE7fPCTKMyKbhPBZ6i1R8jSjgo64eK7OmdZFuo38L" +
+        "+iE1YvH7YnoBJDvMpPG+qFGQiaiD3+Fa5Z8GkotmXoB7VSVkAU" +
+        "w7/s9JKgOBhQACgYEAzhsiNfq3U9RAWhut8YDmRbHJTXMHTytG" +
+        "sK0iRZqg47JllyWbHwSmS8T2k4Dk4FYxQzxgOxW/PbZ5c06P9B" +
+        "YPlazQTcPIwAWSlKTaoTfnWzHnp75hbbPc8HmrSIEHVPr5hHS0" +
+        "DQl5Fu45b5U2KG5cx2Bb3lk17n0y/RqFXFYTv+OBAgCqggIAVa" +
+        "OCAhQwggIQMA8GA1UdDwEB/wQFAwMBqoAwEgYDVR0TAQH/BAgw" +
+        "BgEB/wIBBTAUBgNVHSABAf8ECjAIMAYGBFUdIAAwZwYDVR0RAQ" +
+        "H/BF0wW4EMcmZjQDgyMi5OYW1lggdkTlNOYW1lpBcxFTATBgNV" +
+        "BAoTDE9yZ2FuaXphdGlvboYaaHR0cDovL3VuaWZvcm0uUmVzb3" +
+        "VyY2UuSWSHBP///wCIByoDolyDsgMwDAYDVR0eAQH/BAIwADAM" +
+        "BgNVHSQBAf8EAjAAMIGZBgNVHSUBAf8EgY4wgYsGBFUdJQAGCC" +
+        "sGAQUFBwMBBggrBgEFBQcDAQYIKwYBBQUHAwIGCCsGAQUFBwMD" +
+        "BggrBgEFBQcDBAYIKwYBBQUHAwUGCCsGAQUFBwMGBggrBgEFBQ" +
+        "cDBwYIKwYBBQUHAwgGCCsGAQUFBwMJBggrBgEFBQgCAgYKKwYB" +
+        "BAGCNwoDAwYJYIZIAYb4QgQBMA0GA1UdNgEB/wQDAgEBMA4GBC" +
+        "pNhgkBAf8EAwEBATBkBgNVHRIEXTBbgQxyZmNAODIyLk5hbWWC" +
+        "B2ROU05hbWWkFzEVMBMGA1UEChMMT3JnYW5pemF0aW9uhhpodH" +
+        "RwOi8vdW5pZm9ybS5SZXNvdXJjZS5JZIcE////AIgHKgOiXIOy" +
+        "AzAJBgNVHR8EAjAAMAoGA1UdIwQDAQEBMAoGA1UdDgQDAQEBMA" +
+        "oGA1UdIQQDAQEBMAwGByqGSM44BAMBAQADMAAwLQIVAIu6VjdQ" +
+        "kOyX3jwUCvZk7i8ascXxAhQb4oUMkiRQ1/ThtGvgtiuQUzHBZA" +
+        "==";
+
+    // 2 consecutively encoded X.509 certificates
+    private static String certEncodingBase64 = 
+        "MIIC+jCCAragAwIBAgICAiswDAYHKoZIzjgEAwEBADAdMRswGQ" +
+        "YDVQQKExJDZXJ0aWZpY2F0ZSBJc3N1ZXIwIhgPMTk3MDAxMTIx" +
+        "MzQ2NDBaGA8xOTcwMDEyNDAzMzMyMFowHzEdMBsGA1UEChMUU3" +
+        "ViamVjdCBPcmdhbml6YXRpb24wGTAMBgcqhkjOOAQDAQEAAwkA" +
+        "AQIDBAUGBwiBAgCqggIAVaOCAhQwggIQMA8GA1UdDwEB/wQFAw" +
+        "MBqoAwEgYDVR0TAQH/BAgwBgEB/wIBBTAUBgNVHSABAf8ECjAI" +
+        "MAYGBFUdIAAwZwYDVR0RAQH/BF0wW4EMcmZjQDgyMi5OYW1lgg" +
+        "dkTlNOYW1lpBcxFTATBgNVBAoTDE9yZ2FuaXphdGlvboYaaHR0" +
+        "cDovL3VuaWZvcm0uUmVzb3VyY2UuSWSHBP///wCIByoDolyDsg" +
+        "MwDAYDVR0eAQH/BAIwADAMBgNVHSQBAf8EAjAAMIGZBgNVHSUB" +
+        "Af8EgY4wgYsGBFUdJQAGCCsGAQUFBwMBBggrBgEFBQcDAQYIKw" +
+        "YBBQUHAwIGCCsGAQUFBwMDBggrBgEFBQcDBAYIKwYBBQUHAwUG" +
+        "CCsGAQUFBwMGBggrBgEFBQcDBwYIKwYBBQUHAwgGCCsGAQUFBw" +
+        "MJBggrBgEFBQgCAgYKKwYBBAGCNwoDAwYJYIZIAYb4QgQBMA0G" +
+        "A1UdNgEB/wQDAgEBMA4GBCpNhgkBAf8EAwEBATBkBgNVHRIEXT" +
+        "BbgQxyZmNAODIyLk5hbWWCB2ROU05hbWWkFzEVMBMGA1UEChMM" +
+        "T3JnYW5pemF0aW9uhhpodHRwOi8vdW5pZm9ybS5SZXNvdXJjZS" +
+        "5JZIcE////AIgHKgOiXIOyAzAJBgNVHR8EAjAAMAoGA1UdIwQD" +
+        "AQEBMAoGA1UdDgQDAQEBMAoGA1UdIQQDAQEBMAwGByqGSM44BA" +
+        "MBAQADMAAwLQIUAL4QvoazNWP7jrj84/GZlhm09DsCFQCBKGKC" +
+        "GbrP64VtUt4JPmLjW1VxQDCCAvowggK2oAMCAQICAgIrMAwGBy" +
+        "qGSM44BAMBAQAwHTEbMBkGA1UEChMSQ2VydGlmaWNhdGUgSXNz" +
+        "dWVyMCIYDzE5NzAwMTEyMTM0NjQwWhgPMTk3MDAxMjQwMzMzMj" +
+        "BaMB8xHTAbBgNVBAoTFFN1YmplY3QgT3JnYW5pemF0aW9uMBkw" +
+        "DAYHKoZIzjgEAwEBAAMJAAECAwQFBgcIgQIAqoICAFWjggIUMI" +
+        "ICEDAPBgNVHQ8BAf8EBQMDAaqAMBIGA1UdEwEB/wQIMAYBAf8C" +
+        "AQUwFAYDVR0gAQH/BAowCDAGBgRVHSAAMGcGA1UdEQEB/wRdMF" +
+        "uBDHJmY0A4MjIuTmFtZYIHZE5TTmFtZaQXMRUwEwYDVQQKEwxP" +
+        "cmdhbml6YXRpb26GGmh0dHA6Ly91bmlmb3JtLlJlc291cmNlLk" +
+        "lkhwT///8AiAcqA6Jcg7IDMAwGA1UdHgEB/wQCMAAwDAYDVR0k" +
+        "AQH/BAIwADCBmQYDVR0lAQH/BIGOMIGLBgRVHSUABggrBgEFBQ" +
+        "cDAQYIKwYBBQUHAwEGCCsGAQUFBwMCBggrBgEFBQcDAwYIKwYB" +
+        "BQUHAwQGCCsGAQUFBwMFBggrBgEFBQcDBgYIKwYBBQUHAwcGCC" +
+        "sGAQUFBwMIBggrBgEFBQcDCQYIKwYBBQUIAgIGCisGAQQBgjcK" +
+        "AwMGCWCGSAGG+EIEATANBgNVHTYBAf8EAwIBATAOBgQqTYYJAQ" +
+        "H/BAMBAQEwZAYDVR0SBF0wW4EMcmZjQDgyMi5OYW1lggdkTlNO" +
+        "YW1lpBcxFTATBgNVBAoTDE9yZ2FuaXphdGlvboYaaHR0cDovL3" +
+        "VuaWZvcm0uUmVzb3VyY2UuSWSHBP///wCIByoDolyDsgMwCQYD" +
+        "VR0fBAIwADAKBgNVHSMEAwEBATAKBgNVHQ4EAwEBATAKBgNVHS" +
+        "EEAwEBATAMBgcqhkjOOAQDAQEAAzAAMC0CFAC+EL6GszVj+464" +
+        "/OPxmZYZtPQ7AhUAgShighm6z+uFbVLeCT5i41tVcUA=";
+
+    private static String base64certEncoding = 
+        "-----BEGIN CERTIFICATE-----\n" +
+        "MIIC+jCCAragAwIBAgICAiswDAYHKoZIzjgEAwEBADAdMRswGQYDVQQKExJDZXJ0a" +
+        "WZpY2F0ZSBJc3N1ZXIwIhgPMTk3MDAxMTIxMzQ2NDBaGA8xOTcwMDEyNDAzMzMyMF" +
+        "owHzEdMBsGA1UEChMUU3ViamVjdCBPcmdhbml6YXRpb24wGTAMBgcqhkjOOAQDAQE" +
+        "AAwkAAQIDBAUGBwiBAgCqggIAVaOCAhQwggIQMA8GA1UdDwEB/wQFAwMBqoAwEgYD" +
+        "VR0TAQH/BAgwBgEB/wIBBTAUBgNVHSABAf8ECjAIMAYGBFUdIAAwZwYDVR0RAQH/B" +
+        "F0wW4EMcmZjQDgyMi5OYW1lggdkTlNOYW1lpBcxFTATBgNVBAoTDE9yZ2FuaXphdG" +
+        "lvboYaaHR0cDovL3VuaWZvcm0uUmVzb3VyY2UuSWSHBP///wCIByoDolyDsgMwDAY" +
+        "DVR0eAQH/BAIwADAMBgNVHSQBAf8EAjAAMIGZBgNVHSUBAf8EgY4wgYsGBFUdJQAG" +
+        "CCsGAQUFBwMBBggrBgEFBQcDAQYIKwYBBQUHAwIGCCsGAQUFBwMDBggrBgEFBQcDB" +
+        "AYIKwYBBQUHAwUGCCsGAQUFBwMGBggrBgEFBQcDBwYIKwYBBQUHAwgGCCsGAQUFBw" +
+        "MJBggrBgEFBQgCAgYKKwYBBAGCNwoDAwYJYIZIAYb4QgQBMA0GA1UdNgEB/wQDAgE" +
+        "BMA4GBCpNhgkBAf8EAwEBATBkBgNVHRIEXTBbgQxyZmNAODIyLk5hbWWCB2ROU05h" +
+        "bWWkFzEVMBMGA1UEChMMT3JnYW5pemF0aW9uhhpodHRwOi8vdW5pZm9ybS5SZXNvd" +
+        "XJjZS5JZIcE////AIgHKgOiXIOyAzAJBgNVHR8EAjAAMAoGA1UdIwQDAQEBMAoGA1" +
+        "UdDgQDAQEBMAoGA1UdIQQDAQEBMAwGByqGSM44BAMBAQADMAAwLQIUAL4QvoazNWP" +
+        "7jrj84/GZlhm09DsCFQCBKGKCGbrP64VtUt4JPmLjW1VxQA==\n" +
+        "-----END CERTIFICATE-----\n" +
+        "-----BEGIN CERTIFICATE-----\n" +
+        "MIIC+jCCAragAwIBAgICAiswDAYHKoZIzjgEAwEBADAdMRswGQYDVQQKExJDZXJ0a" +
+        "WZpY2F0ZSBJc3N1ZXIwIhgPMTk3MDAxMTIxMzQ2NDBaGA8xOTcwMDEyNDAzMzMyMF" +
+        "owHzEdMBsGA1UEChMUU3ViamVjdCBPcmdhbml6YXRpb24wGTAMBgcqhkjOOAQDAQE" +
+        "AAwkAAQIDBAUGBwiBAgCqggIAVaOCAhQwggIQMA8GA1UdDwEB/wQFAwMBqoAwEgYD" +
+        "VR0TAQH/BAgwBgEB/wIBBTAUBgNVHSABAf8ECjAIMAYGBFUdIAAwZwYDVR0RAQH/B" +
+        "F0wW4EMcmZjQDgyMi5OYW1lggdkTlNOYW1lpBcxFTATBgNVBAoTDE9yZ2FuaXphdG" +
+        "lvboYaaHR0cDovL3VuaWZvcm0uUmVzb3VyY2UuSWSHBP///wCIByoDolyDsgMwDAY" +
+        "DVR0eAQH/BAIwADAMBgNVHSQBAf8EAjAAMIGZBgNVHSUBAf8EgY4wgYsGBFUdJQAG" +
+        "CCsGAQUFBwMBBggrBgEFBQcDAQYIKwYBBQUHAwIGCCsGAQUFBwMDBggrBgEFBQcDB" +
+        "AYIKwYBBQUHAwUGCCsGAQUFBwMGBggrBgEFBQcDBwYIKwYBBQUHAwgGCCsGAQUFBw" +
+        "MJBggrBgEFBQgCAgYKKwYBBAGCNwoDAwYJYIZIAYb4QgQBMA0GA1UdNgEB/wQDAgE" +
+        "BMA4GBCpNhgkBAf8EAwEBATBkBgNVHRIEXTBbgQxyZmNAODIyLk5hbWWCB2ROU05h" +
+        "bWWkFzEVMBMGA1UEChMMT3JnYW5pemF0aW9uhhpodHRwOi8vdW5pZm9ybS5SZXNvd" +
+        "XJjZS5JZIcE////AIgHKgOiXIOyAzAJBgNVHR8EAjAAMAoGA1UdIwQDAQEBMAoGA1" +
+        "UdDgQDAQEBMAoGA1UdIQQDAQEBMAwGByqGSM44BAMBAQADMAAwLQIUAL4QvoazNWP" +
+        "7jrj84/GZlhm09DsCFQCBKGKCGbrP64VtUt4JPmLjW1VxQA==\n" +
+        "-----END CERTIFICATE-----\n";
+
+    private static String crlEncodingBase64 = 
+        "MIIBNDCB8gIBATAMBgcqhkjOOAQDAQEAMBUxEzARBgNVBAoTCk" +
+        "NSTCBJc3N1ZXIXDTA1MDcxMzA5NDkzMFoXDTA1MDcxMzA5NTEx" +
+        "MFowgZgwEwICAisXDTA1MDcxMzA5NDkzMVowbAICAjcXDTA1MD" +
+        "cxMzA5NDkzMVowVzAKBgNVHRUEAwoBATAcBgNVHRgEFRgTMjAw" +
+        "NTA3MTMwOTQ5MzAuNTYyWjArBgNVHR0BAf8EITAfpB0xGzAZBg" +
+        "NVBAoTEkNlcnRpZmljYXRlIElzc3VlcjATAgIDCRcNMDUwNzEz" +
+        "MDk0OTMxWqAPMA0wCwYDVR0UBAQCAhFcMAwGByqGSM44BAMBAQ" +
+        "ADLwAwLAIUYp/1MGXvQ1a/wF+WvmRGnQHJ+nQCFBJ4JFNfcCN7" +
+        "wNUpSOnUYHEC8uInMIIBNDCB8gIBATAMBgcqhkjOOAQDAQEAMB" +
+        "UxEzARBgNVBAoTCkNSTCBJc3N1ZXIXDTA1MDcxMzA5NDkzMFoX" +
+        "DTA1MDcxMzA5NTExMFowgZgwEwICAisXDTA1MDcxMzA5NDkzMV" +
+        "owbAICAjcXDTA1MDcxMzA5NDkzMVowVzAKBgNVHRUEAwoBATAc" +
+        "BgNVHRgEFRgTMjAwNTA3MTMwOTQ5MzAuNTYyWjArBgNVHR0BAf" +
+        "8EITAfpB0xGzAZBgNVBAoTEkNlcnRpZmljYXRlIElzc3VlcjAT" +
+        "AgIDCRcNMDUwNzEzMDk0OTMxWqAPMA0wCwYDVR0UBAQCAhFcMA" +
+        "wGByqGSM44BAMBAQADLwAwLAIUYp/1MGXvQ1a/wF+WvmRGnQHJ" +
+        "+nQCFBJ4JFNfcCN7wNUpSOnUYHEC8uIn"; 
+    
+    private static String crlEncodingPEM = 
+        "-----BEGIN X509 CRL-----\n" +
+        "MIIBNDCB8gIBATAMBgcqhkjOOAQDAQEAMBUxEzARBgNVBAoTCk" +
+        "NSTCBJc3N1ZXIXDTA1MDcxMzA5NDkzMFoXDTA1MDcxMzA5NTEx" +
+        "MFowgZgwEwICAisXDTA1MDcxMzA5NDkzMVowbAICAjcXDTA1MD" +
+        "cxMzA5NDkzMVowVzAKBgNVHRUEAwoBATAcBgNVHRgEFRgTMjAw" +
+        "NTA3MTMwOTQ5MzAuNTYyWjArBgNVHR0BAf8EITAfpB0xGzAZBg" +
+        "NVBAoTEkNlcnRpZmljYXRlIElzc3VlcjATAgIDCRcNMDUwNzEz" +
+        "MDk0OTMxWqAPMA0wCwYDVR0UBAQCAhFcMAwGByqGSM44BAMBAQ" +
+        "ADLwAwLAIUYp/1MGXvQ1a/wF+WvmRGnQHJ+nQCFBJ4JFNfcCN7" +
+        "wNUpSOnUYHEC8uIm\n" +
+        "-----END X509 CRL-----\n" +
+        "-----BEGIN X509 CRL-----\n" +
+        "MIIBNDCB8gIBATAMBgcqhkjOOAQDAQEAMB" +
+        "UxEzARBgNVBAoTCkNSTCBJc3N1ZXIXDTA1MDcxMzA5NDkzMFoX" +
+        "DTA1MDcxMzA5NTExMFowgZgwEwICAisXDTA1MDcxMzA5NDkzMV" +
+        "owbAICAjcXDTA1MDcxMzA5NDkzMVowVzAKBgNVHRUEAwoBATAc" +
+        "BgNVHRgEFRgTMjAwNTA3MTMwOTQ5MzAuNTYyWjArBgNVHR0BAf" +
+        "8EITAfpB0xGzAZBgNVBAoTEkNlcnRpZmljYXRlIElzc3VlcjAT" +
+        "AgIDCRcNMDUwNzEzMDk0OTMxWqAPMA0wCwYDVR0UBAQCAhFcMA" +
+        "wGByqGSM44BAMBAQADLwAwLAIUYp/1MGXvQ1a/wF+WvmRGnQHJ" +
+        "+nQCFBJ4JFNfcCN7wNUpSOnUYHEC8uIo\n" +
+        "-----END X509 CRL-----\n";
+
+    
+    public static byte[] getCertPathPKCS7Encoding() {
+        return Base64.decode(certPathPKCS7Base64.getBytes());
+    }
+
+    public static byte[] getCertPathPkiPathEncoding() {
+        return Base64.decode(certPathPkiPathBase64.getBytes());
+    }
+
+    public static byte[] getCertEncoding() {
+        return Base64.decode(certEncodingBase64.getBytes());
+    }
+
+    public static byte[] getBase64CertEncoding() {
+        return base64certEncoding.getBytes();
+    }
+
+    public static byte[] getBase64CRLEncoding() {
+        return crlEncodingPEM.getBytes();
+    }
+
+    public static byte[] getCRLEncoding() {
+        return Base64.decode(crlEncodingBase64.getBytes());
+    }
+}
+

Added: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/spec/MyEncodedKeySpec.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/spec/MyEncodedKeySpec.java?rev=410788&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/spec/MyEncodedKeySpec.java
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/spec/MyEncodedKeySpec.java
Thu Jun  1 01:15:17 2006
@@ -0,0 +1,48 @@
+/*
+ *  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.support.spec;
+
+import java.security.spec.EncodedKeySpec;
+
+/**
+ * Support class for abstract base class testing
+ */
+
+public class MyEncodedKeySpec extends EncodedKeySpec {
+
+    /**
+     * Constructor
+     * @param encodedKey
+     */
+    public MyEncodedKeySpec(byte[] encodedKey) {
+        super(encodedKey);
+    }
+
+    /**
+     * Returns format - "My"
+     * @see java.security.spec.EncodedKeySpec#getFormat()
+     */
+    public String getFormat() {
+        return "My";
+    }
+
+}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/x-net/make/common/build.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/x-net/make/common/build.xml?rev=410788&r1=410787&r2=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/x-net/make/common/build.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/x-net/make/common/build.xml Thu Jun
 1 01:15:17 2006
@@ -59,7 +59,7 @@
             <!-- FIXME: X-NET tests should not reach into security module code -->
             <src>
                 <pathelement location="${hy.x-net.src.test.java}"/>
-                <pathelement location="${hy.x-net}/../security/src/test/java/common"/>
+                <pathelement location="${hy.x-net}/../security/src/test/support/common/java"/>
             </src>
 
             <include name="javax/net/**/*Test*.java" />
@@ -95,7 +95,7 @@
             <!-- Note: will be deleted after improving             -->
             <!-- SerializationTest support class: all resource     -->
             <!-- files will be placed on the classpath             -->
-            <jvmarg value="-DTEST_SRC_DIR=${hy.x-net.src.test.java}"/>
+            <jvmarg value="-DRESOURCE_DIR=${hy.x-net.src.test.java}"/>
 
             <!--  run tests via bootclasspath  --> 
             <jvmarg value="-Xbootclasspath/a:${hy.x-net.bin.test}${path.separator}../../../../${junit.jar}${path.separator}../../../../build/tests"
/> 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/HandshakeCompletedEventTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/HandshakeCompletedEventTest.java?rev=410788&r1=410787&r2=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/HandshakeCompletedEventTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/HandshakeCompletedEventTest.java
Thu Jun  1 01:15:17 2006
@@ -20,7 +20,7 @@
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.SSLSocket;
 
-import org.apache.harmony.security.support.SerializationTest;
+import org.apache.harmony.security.tests.support.SerializationTest;
 
 /**
  * Test for HandshakeCompletedEvent serialization

Modified: incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLExceptionTest.java?rev=410788&r1=410787&r2=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLExceptionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLExceptionTest.java
Thu Jun  1 01:15:17 2006
@@ -23,7 +23,7 @@
 
 import javax.net.ssl.SSLException;
 
-import org.apache.harmony.security.support.SerializationTest;
+import org.apache.harmony.security.tests.support.SerializationTest;
 
 
 /**

Modified: incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLHandshakeExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLHandshakeExceptionTest.java?rev=410788&r1=410787&r2=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLHandshakeExceptionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLHandshakeExceptionTest.java
Thu Jun  1 01:15:17 2006
@@ -23,7 +23,7 @@
 
 import javax.net.ssl.SSLHandshakeException;
 
-import org.apache.harmony.security.support.SerializationTest;
+import org.apache.harmony.security.tests.support.SerializationTest;
 
 
 /**

Modified: incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLKeyExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLKeyExceptionTest.java?rev=410788&r1=410787&r2=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLKeyExceptionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLKeyExceptionTest.java
Thu Jun  1 01:15:17 2006
@@ -23,7 +23,7 @@
 
 import javax.net.ssl.SSLKeyException;
 
-import org.apache.harmony.security.support.SerializationTest;
+import org.apache.harmony.security.tests.support.SerializationTest;
 
 
 /**

Modified: incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLPeerUnverifiedExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLPeerUnverifiedExceptionTest.java?rev=410788&r1=410787&r2=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLPeerUnverifiedExceptionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLPeerUnverifiedExceptionTest.java
Thu Jun  1 01:15:17 2006
@@ -23,7 +23,7 @@
 
 import javax.net.ssl.SSLPeerUnverifiedException;
 
-import org.apache.harmony.security.support.SerializationTest;
+import org.apache.harmony.security.tests.support.SerializationTest;
 
 
 /**

Modified: incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLProtocolExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLProtocolExceptionTest.java?rev=410788&r1=410787&r2=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLProtocolExceptionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLProtocolExceptionTest.java
Thu Jun  1 01:15:17 2006
@@ -23,7 +23,7 @@
 
 import javax.net.ssl.SSLProtocolException;
 
-import org.apache.harmony.security.support.SerializationTest;
+import org.apache.harmony.security.tests.support.SerializationTest;
 
 
 /**

Modified: incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLSessionBindingEventTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLSessionBindingEventTest.java?rev=410788&r1=410787&r2=410788&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLSessionBindingEventTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLSessionBindingEventTest.java
Thu Jun  1 01:15:17 2006
@@ -20,7 +20,7 @@
 import javax.net.ssl.SSLSessionBindingEvent;
 import javax.net.ssl.SSLSocket;
 
-import org.apache.harmony.security.support.SerializationTest;
+import org.apache.harmony.security.tests.support.SerializationTest;
 
 /**
  * Test for SSLSessionBindingEvent serialization



Mime
View raw message