Search in sources :

Example 31 with MyCertificate

use of org.apache.harmony.security.tests.support.cert.MyCertificate in project robovm by robovm.

the class CollectionCertStoreParametersTest method testToString02.

/**
     * Test #2 for <code>toString()</code> method<br>
     */
public final void testToString02() {
    Vector<Certificate> certificates = new Vector<Certificate>();
    certificates.add(new MyCertificate("TEST", new byte[] { (byte) 4 }));
    CollectionCertStoreParameters cp = new CollectionCertStoreParameters(certificates);
    assertNotNull(cp.toString());
}
Also used : MyCertificate(org.apache.harmony.security.tests.support.cert.MyCertificate) CollectionCertStoreParameters(java.security.cert.CollectionCertStoreParameters) Vector(java.util.Vector) Certificate(java.security.cert.Certificate) MyCertificate(org.apache.harmony.security.tests.support.cert.MyCertificate)

Example 32 with MyCertificate

use of org.apache.harmony.security.tests.support.cert.MyCertificate in project robovm by robovm.

the class CollectionCertStoreParametersTest method testCollectionCertStoreParametersCollection01.

/**
     * Test #1 for <code>CollectionCertStoreParameters(Collection)</code>
     * constructor<br>
     */
public final void testCollectionCertStoreParametersCollection01() {
    Vector<Certificate> certificates = new Vector<Certificate>();
    certificates.add(new MyCertificate("TEST", new byte[] {}));
    new CollectionCertStoreParameters(certificates);
}
Also used : MyCertificate(org.apache.harmony.security.tests.support.cert.MyCertificate) CollectionCertStoreParameters(java.security.cert.CollectionCertStoreParameters) Vector(java.util.Vector) Certificate(java.security.cert.Certificate) MyCertificate(org.apache.harmony.security.tests.support.cert.MyCertificate)

Aggregations

MyCertificate (org.apache.harmony.security.tests.support.cert.MyCertificate)32 Certificate (java.security.cert.Certificate)26 MyFailingCertificate (org.apache.harmony.security.tests.support.cert.MyFailingCertificate)15 Vector (java.util.Vector)6 CollectionCertStoreParameters (java.security.cert.CollectionCertStoreParameters)5 ObjectStreamException (java.io.ObjectStreamException)4 CertificateException (java.security.cert.CertificateException)4 KeyStore (java.security.KeyStore)3 CertificateFactory (java.security.cert.CertificateFactory)3 ByteArrayInputStream (java.io.ByteArrayInputStream)2 MyCertificateRep (org.apache.harmony.security.tests.support.cert.MyCertificate.MyCertificateRep)2 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 IOException (java.io.IOException)1 ObjectOutputStream (java.io.ObjectOutputStream)1 InvalidAlgorithmParameterException (java.security.InvalidAlgorithmParameterException)1 InvalidKeyException (java.security.InvalidKeyException)1 KeyStoreException (java.security.KeyStoreException)1 NoSuchAlgorithmException (java.security.NoSuchAlgorithmException)1 NoSuchProviderException (java.security.NoSuchProviderException)1 PrivateKey (java.security.PrivateKey)1