Examples of MyCertificate


Examples of org.apache.harmony.security.tests.support.cert.MyCertificate

        throws InvalidKeyException,
               CertificateException,
               NoSuchAlgorithmException,
               NoSuchProviderException,
               SignatureException {
        Certificate c1 = new MyCertificate("TEST_TYPE", testEncoding);
        c1.verify(null, null);
    }
View Full Code Here

Examples of org.apache.harmony.security.tests.support.cert.MyCertificate

    /**
     * This test just calls <code>toString()</code> method<br>
     */
    public final void testToString() {
        Certificate c1 = new MyCertificate("TEST_TYPE", testEncoding);
        c1.toString();
    }
View Full Code Here

Examples of org.apache.harmony.security.tests.support.cert.MyCertificate

    /**
     * This test just calls <code>testGetPublicKey()</code> method<br>
     */
    public final void testGetPublicKey() {
        Certificate c1 = new MyCertificate("TEST_TYPE", testEncoding);
        c1.getPublicKey();
    }
View Full Code Here

Examples of org.apache.harmony.security.tests.support.cert.MyCertificate

    /**
     * Test for <codfe>getTrustedCertificate()</code> method
     * Assertion: returns trusted Certificate from goven entry
     */
    public void testGetTrustedCertificate() {
        Certificate cert = new MyCertificate("TEST", new byte[10]);
        KeyStore.TrustedCertificateEntry ksTCE =
                new KeyStore.TrustedCertificateEntry(cert);
        assertEquals("Incorrect certificate", cert, ksTCE.getTrustedCertificate());
    }
View Full Code Here

Examples of org.apache.harmony.security.tests.support.cert.MyCertificate

    /**
     * Test for <codfe>toString()</code> method
     * Assertion: returns non null string
     */
    public void testToString() {
        Certificate cert = new MyCertificate("TEST", new byte[10]);
        KeyStore.TrustedCertificateEntry ksTCE =
                new KeyStore.TrustedCertificateEntry(cert);
        assertNotNull("toString() returns null string", ksTCE.toString());
    }
View Full Code Here

Examples of org.apache.harmony.security.tests.support.cert.MyCertificate

     * constructor<br>
     * Assertion: Creates an instance of CollectionCertStoreParameters
     */
    public final void testCollectionCertStoreParametersCollection01() {
        Vector certificates = new Vector();
        certificates.add(new MyCertificate("TEST", new byte[] {}));
        new CollectionCertStoreParameters(certificates);
    }
View Full Code Here

Examples of org.apache.harmony.security.tests.support.cert.MyCertificate

        // check that the reference is used
        assertTrue("isRefUsed_1", certificates == cp.getCollection());
        // check that collection still empty
        assertTrue("isEmpty", cp.getCollection().isEmpty());
        // modify our collection
        certificates.add(new MyCertificate("TEST", new byte[] {(byte)1}));
        certificates.add(new MyCertificate("TEST", new byte[] {(byte)2}));
        // check that internal state has been changed accordingly
        assertTrue("isRefUsed_2", certificates.equals(cp.getCollection()));
    }
View Full Code Here

Examples of org.apache.harmony.security.tests.support.cert.MyCertificate

     * Test #1 for <code>clone()</code> method<br>
     * Assertion: Returns a copy of this object
     */
    public final void testClone01() {
        Vector certificates = new Vector();
        certificates.add(new MyCertificate("TEST", new byte[] {(byte)4}));
        CollectionCertStoreParameters cp1 =
            new CollectionCertStoreParameters(certificates);
        CollectionCertStoreParameters cp2 =
            (CollectionCertStoreParameters)cp1.clone();
        // check that that we have new object
View Full Code Here

Examples of org.apache.harmony.security.tests.support.cert.MyCertificate

     * Assertion: ...only a reference to the <code>Collection</code>
     * is copied, and not the contents
     */
    public final void testClone02() {
        Vector certificates = new Vector();
        certificates.add(new MyCertificate("TEST", new byte[] {(byte)4}));
        CollectionCertStoreParameters cp1 =
            new CollectionCertStoreParameters(certificates);
        CollectionCertStoreParameters cp2 =
            (CollectionCertStoreParameters)cp1.clone();
        // check that both objects hold the same reference
View Full Code Here

Examples of org.apache.harmony.security.tests.support.cert.MyCertificate

     * Test #2 for <code>toString()</code> method<br>
     * Assertion: returns the formatted string describing parameters
     */
    public final void testToString02() {
        Vector certificates = new Vector();
        certificates.add(new MyCertificate("TEST", new byte[] {(byte)4}));
        CollectionCertStoreParameters cp =
            new CollectionCertStoreParameters(certificates);

        assertNotNull(cp.toString());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.