Package java.security.KeyStore

Examples of java.security.KeyStore.ProtectionParameter


            bcParam = new PKCS12StoreParameter(((JDKPKCS12StoreParameter)param).getOutputStream(),
                param.getProtectionParameter(), ((JDKPKCS12StoreParameter)param).isUseDEREncoding());
        }

        char[] password;
        ProtectionParameter protParam = param.getProtectionParameter();
        if (protParam == null)
        {
            password = null;
        }
        else if (protParam instanceof KeyStore.PasswordProtection)
        {
            password = ((KeyStore.PasswordProtection)protParam).getPassword();
        }
        else
        {
            throw new IllegalArgumentException(
                "No support for protection parameter of type " + protParam.getClass().getName());
        }

        doStore(bcParam.getOutputStream(), password, bcParam.isForDEREncoding());
    }
View Full Code Here


                .getResourceAsStream("builderimpl.ks");
        KeyStore ks = KeyStore.getInstance(alias);
        ks.load(fis, pwd);
        Builder b = Builder.newInstance(ks, new PasswordProtection(pwd));
        KeyStore firstKeyStore = b.getKeyStore();
        ProtectionParameter firstProtParameter = b
                .getProtectionParameter(alias);
        assertSame(firstKeyStore, b.getKeyStore());
        assertSame(firstProtParameter, b.getProtectionParameter(alias));

        b = Builder.newInstance(alias, ks.getProvider(),
View Full Code Here

                .getResourceAsStream("builderimpl.ks");
        KeyStore ks = KeyStore.getInstance(alias);
        ks.load(fis, pwd);
        Builder b = Builder.newInstance(ks, new PasswordProtection(pwd));
        KeyStore firstKeyStore = b.getKeyStore();
        ProtectionParameter firstProtParameter = b
                .getProtectionParameter(alias);
        assertSame(firstKeyStore, b.getKeyStore());
        assertSame(firstProtParameter, b.getProtectionParameter(alias));

        b = Builder.newInstance(alias, ks.getProvider(),
View Full Code Here

TOP

Related Classes of java.security.KeyStore.ProtectionParameter

Copyright © 2018 www.massapicom. 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.