Java 类java.security.cert.CertificateFactorySpi 实例源码

项目:In-the-Box-Fork    文件:CertificateFactorySpiTest.java   
/**
 * Test for <code>engineGenerateCertPath(InputStream)</code> method.
 * Assertion: Generates a <code>CertPath</code> object and initializes it
 * with the data read from the <code>InputStream</code>
 */
@TestTargetNew(
    level = TestLevel.PARTIAL_COMPLETE,
    notes = "Verifies that engineGenerateCertPath method returns null.",
    method = "engineGenerateCertPath",
    args = {java.io.InputStream.class}
)
public void testEngineGenerateCertPathLjava_io_InputStream01() {
    CertificateFactorySpi certFactorySpi = new MyCertificateFactorySpi();

    MyCertificateFactorySpi.putMode(true);
    ByteArrayInputStream bais = new ByteArrayInputStream(new byte[0]);
    DataInputStream dis = new DataInputStream(bais);

    try {
        assertNull(certFactorySpi.engineGenerateCertPath(dis));
    } catch (CertificateException e) {
        fail("Unexpected CertificateException " + e.getMessage());
    }
}
项目:In-the-Box-Fork    文件:CertificateFactorySpiTest.java   
@TestTargets({
    @TestTargetNew(
        level = TestLevel.COMPLETE,
        notes = "",
        method = "engineGenerateCRL",
        args = {java.io.InputStream.class}
    ),
    @TestTargetNew(
        level = TestLevel.COMPLETE,
        notes = "",
        method = "engineGenerateCRLs",
        args = {java.io.InputStream.class}
    ),
    @TestTargetNew(
        level = TestLevel.COMPLETE,
        notes = "",
        method = "engineGenerateCertificate",
        args = {java.io.InputStream.class}
    ),
    @TestTargetNew(
        level = TestLevel.COMPLETE,
        notes = "",
        method = "engineGenerateCertificates",
        args = {java.io.InputStream.class}
    )
})
public void testAbstractMethods() {
    CertificateFactorySpi certFactorySpi = new extCertificateFactorySpi();
    ByteArrayInputStream bais = new ByteArrayInputStream(new byte[3]);
    DataInputStream dis = new DataInputStream(bais);

    try {
        certFactorySpi.engineGenerateCRL(dis);
        certFactorySpi.engineGenerateCRLs(dis);
        certFactorySpi.engineGenerateCertificate(dis);
        certFactorySpi.engineGenerateCertificates(dis);
    } catch (Exception e) {
        fail("Unexpected exception " + e.getMessage());
    }
}
项目:In-the-Box-Fork    文件:CertificateFactory1Test.java   
public myCertificateFactory(CertificateFactorySpi spi, Provider prov,
        String type) {
    super(spi, prov, type);
}
项目:cn1    文件:CertificateFactory1Test.java   
public myCertificateFactory(CertificateFactorySpi spi, Provider prov,
        String type) {
    super(spi, prov, type);
}
项目:freeVM    文件:CertificateFactory1Test.java   
public myCertificateFactory(CertificateFactorySpi spi, Provider prov,
        String type) {
    super(spi, prov, type);
}
项目:freeVM    文件:CertificateFactory1Test.java   
public myCertificateFactory(CertificateFactorySpi spi, Provider prov,
        String type) {
    super(spi, prov, type);
}
项目:freeVM    文件:Btest4513_case1.java   
public myCertificateFactory(CertificateFactorySpi spi, 
        Provider prov,
        String type) {
    super(spi, prov, type);
}