Package java.security

Examples of java.security.KeyStoreException


   
    protected void engineInit(KeyStore ks, char[] password)
            throws KeyStoreException, NoSuchAlgorithmException,
            UnrecoverableKeyException {
        if (password == null) {
            throw new KeyStoreException("Incorrect password");           
        }
        if (ks == null) {
            throw new UnrecoverableKeyException("Incorrect keystore");
        }
    }
View Full Code Here


*/

public class MyTrustManagerFactorySpi extends TrustManagerFactorySpi {
    protected void engineInit(KeyStore ks) throws KeyStoreException {
        if (ks == null) {
            throw new KeyStoreException("Not supported operation for null KeyStore");
        }
    }
View Full Code Here

        PKCS10CertificationRequest csr = new PKCS10CertificationRequest(sigalg,
                subject, publicKey, attributes, signingKey);

        if (!csr.verify()) {
            throw new KeyStoreException("CSR verification failed");
        }

        ByteArrayOutputStream os = new ByteArrayOutputStream();
        DEROutputStream deros = new DEROutputStream(os);
        deros.writeObject(csr.getDERObject());
View Full Code Here

            "New message",
            "Long message for Exception. Long message for Exception. Long message for Exception." };

    protected Object[] getData() {
        Exception cause = new Exception(msgs[1]);
        KeyStoreException dExc = new KeyStoreException(msgs[0], cause);
        String msg = null;
        Throwable th = null;
        return new Object[] { new KeyStoreException(), new KeyStoreException(msg),
                new KeyStoreException(msgs[1]),
                new KeyStoreException(new Throwable()), new KeyStoreException(th),
                new KeyStoreException(msgs[1], dExc) };
    }
View Full Code Here

    }

    public void engineSetKeyEntry(String alias, byte[] key, Certificate[] chain)
            throws KeyStoreException {
        if (key == null) {
            throw new KeyStoreException("Not Supported for null key");
        }
        if (Cert.containsKey(alias)) {
            Cert.remove(alias);
        }
        if (Chain.containsKey(alias)) {
View Full Code Here

        return new Date(0);
    }

    public void engineSetKeyEntry(String alias, Key key, char[] password,
            Certificate[] chain) throws KeyStoreException {
        throw new KeyStoreException(
                "engineSetKeyEntry is not supported in myKeyStoreSpi");
    }
View Full Code Here

                "engineSetKeyEntry is not supported in myKeyStoreSpi");
    }

    public void engineSetKeyEntry(String alias, byte[] key, Certificate[] chain)
            throws KeyStoreException {
        throw new KeyStoreException(
                "engineSetKeyEntry is not supported in myKeyStoreSpi");
    }
View Full Code Here

                "engineSetKeyEntry is not supported in myKeyStoreSpi");
    }

    public void engineSetCertificateEntry(String alias, Certificate cert)
            throws KeyStoreException {
        throw new KeyStoreException(
                "engineSetCertificateEntry is not supported in myKeyStoreSpi");
    }
View Full Code Here

        throw new KeyStoreException(
                "engineSetCertificateEntry is not supported in myKeyStoreSpi");
    }

    public void engineDeleteEntry(String alias) throws KeyStoreException {
        throw new KeyStoreException(
                "engineDeleteEntry is not supported in myKeyStoreSpi");
    }
View Full Code Here

    /**
     * Test for <code>KeyStoreException()</code> constructor Assertion:
     * constructs KeyStoreException with no detail message
     */
    public void testKeyStoreException01() {
        KeyStoreException tE = new KeyStoreException();
        assertNull("getMessage() must return null.", tE.getMessage());
        assertNull("getCause() must return null", tE.getCause());
    }
View Full Code Here

TOP

Related Classes of java.security.KeyStoreException

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.