Examples of engineInit()


Examples of org.apache.harmony.xnet.provider.jsse.TrustManagerFactoryImpl.engineInit()

    /*
     * Class under test for void engineInit(KeyStore)
     */
    public void testEngineInitKeyStore() throws Exception {
        TrustManagerFactoryImpl tmf = new TrustManagerFactoryImpl();
        tmf.engineInit((KeyStore) null);

        String def_keystore = System.getProperty("javax.net.ssl.trustStore");
        System.setProperty("javax.net.ssl.trustStore", "abc");
        try {
            tmf.engineInit((KeyStore) null);
View Full Code Here

Examples of org.apache.harmony.xnet.provider.jsse.TrustManagerFactoryImpl.engineInit()

        tmf.engineInit((KeyStore) null);

        String def_keystore = System.getProperty("javax.net.ssl.trustStore");
        System.setProperty("javax.net.ssl.trustStore", "abc");
        try {
            tmf.engineInit((KeyStore) null);
            fail("No expected KeyStoreException");
        } catch (KeyStoreException e) {
        } finally {
            if (def_keystore == null) {
                System.clearProperty("javax.net.ssl.trustStore");
View Full Code Here

Examples of org.apache.harmony.xnet.provider.jsse.TrustManagerFactoryImpl.engineInit()

     */
    public void testEngineInitManagerFactoryParameters() {
        TrustManagerFactoryImpl tmf = new TrustManagerFactoryImpl();

        try {
            tmf.engineInit((ManagerFactoryParameters) null);
            fail("No expected InvalidAlgorithmParameterException");
        } catch (InvalidAlgorithmParameterException e) {
        }
    }

View Full Code Here

Examples of org.apache.harmony.xnet.provider.jsse.TrustManagerFactoryImpl.engineInit()

            // expected
        }
        KeyStore ks;
        ks = KeyStore.getInstance("BKS");
        ks.load(null, null);
        tmf.engineInit(ks);

        TrustManager[] tma = tmf.engineGetTrustManagers();
        assertEquals("Incorrect array length", 1, tma.length);
        assertTrue("Incorrect KeyManager type",
                tma[0] instanceof TrustManagerImpl);
View Full Code Here

Examples of org.bouncycastle.jcajce.provider.asymmetric.ec.IESCipher.engineInit()

                new ECDHBasicAgreement(), new KDF2BytesGenerator(
                        new SHA1Digest()), new HMac(new SHA256Digest()),
                new PaddedBufferedBlockCipher(new CBCBlockCipher(
                        new AESEngine()))));

        cipher.engineInit(forEncryption ? Cipher.ENCRYPT_MODE
                : Cipher.DECRYPT_MODE, recipient, new SecureRandom());
        return cipher.engineDoFinal(input, 0, input.length);
    }

    public static byte[] generateAESKey() {
View Full Code Here

Examples of org.bouncycastle.jce.provider.X509AttrCertParser.engineInit()

        X509AttrCertParser parser = new X509AttrCertParser();
        while (it.hasNext())
        {
            try
            {
                parser.engineInit(new ByteArrayInputStream((byte[])it
                    .next()));
                X509AttributeCertificate cert = (X509AttributeCertificate)parser
                    .engineRead();
                if (xselector.match((Object)cert))
                {
View Full Code Here

Examples of org.bouncycastle.jce.provider.X509AttrCertParser.engineInit()

        X509AttrCertParser parser = new X509AttrCertParser();
        while (it.hasNext())
        {
            try
            {
                parser.engineInit(new ByteArrayInputStream((byte[])it
                    .next()));
                X509AttributeCertificate cert = (X509AttributeCertificate)parser
                    .engineRead();
                if (xselector.match((Object)cert))
                {
View Full Code Here

Examples of org.bouncycastle.jce.provider.X509CRLParser.engineInit()

            // the certificates and crls
            X509CertParser cr = new X509CertParser();
            cr.engineInit(new ByteArrayInputStream(contentsKey));
            certs = cr.engineReadAll();
            X509CRLParser cl = new X509CRLParser();
            cl.engineInit(new ByteArrayInputStream(contentsKey));
            crls = cl.engineReadAll();

            // the possible ID_PKCS7_DATA
            ASN1Sequence rsaData = (ASN1Sequence)content.getObjectAt(2);
            if (rsaData.size() > 1) {
View Full Code Here

Examples of org.bouncycastle.jce.provider.X509CRLParser.engineInit()

        Iterator it = list.iterator();
        while (it.hasNext())
        {
            try
            {
                parser.engineInit(new ByteArrayInputStream((byte[])it
                    .next()));
                X509CRL crl = (X509CRL)parser.engineRead();
                if (xselector.match((Object)crl))
                {
                    crlSet.add(crl);
View Full Code Here

Examples of org.bouncycastle.jce.provider.X509CRLParser.engineInit()

        Iterator it = list.iterator();
        while (it.hasNext())
        {
            try
            {
                parser.engineInit(new ByteArrayInputStream((byte[])it
                    .next()));
                X509CRL crl = (X509CRL)parser.engineRead();
                if (xselector.match((Object)crl))
                {
                    crlSet.add(crl);
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.