Package org.apache.geronimo.management.geronimo

Examples of org.apache.geronimo.management.geronimo.KeyNotFoundException


    public PrivateKey getPrivateKey(String alias, char[] storePassword, char[] keyPasswordthrows KeyNotFoundException, KeystoreException, KeystoreIsLocked {
        ensureLoaded(storePassword);
        try {
            PrivateKey key = (PrivateKey) keystore.getKey(alias, keyPassword);
            if (key == null) {
                throw new KeyNotFoundException("Keystore '"+keystoreName+"' does not contain a private key with alias'"+alias+"'.");
            }
            return key;
        } catch (KeyStoreException e) {
            throw new KeystoreException("Unable to retrieve private key from keystore", e);
        } catch (NoSuchAlgorithmException e) {
View Full Code Here


    public Certificate getCertificate(String alias, char[] storePassword) throws KeystoreIsLocked, KeyNotFoundException, KeystoreException {
        ensureLoaded(storePassword);
        try {
            Certificate cert = keystore.getCertificate(alias);
            if (cert == null) {
                throw new KeyNotFoundException("Keystore '"+keystoreName+"' does not contain a certificate with alias'"+alias+"'.");
            }
            return cert;
        } catch (KeyStoreException e) {
            throw new KeystoreException("Unable to retrieve certificate from keystore", e);
        }
View Full Code Here

    public String getCertificateAlias(Certificate cert, char[] storePassword) throws KeystoreException {
        ensureLoaded(storePassword);
        try {
            String alias = keystore.getCertificateAlias(cert);
            if (alias == null) {
                throw new KeyNotFoundException("Keystore '"+keystoreName+"' does not contain an alias corresponding to the given certificate.");
            }
            return alias;
        } catch (KeyStoreException e) {
            throw new KeystoreException("Unable to read certificate alias from keystore", e);
        }
View Full Code Here

    public Certificate[] getCertificateChain(String alias, char[] storePassword) throws KeystoreException {
        ensureLoaded(storePassword);
        try {
            Certificate[] certs = keystore.getCertificateChain(alias);
            if (certs == null) {
                throw new KeyNotFoundException("Keystore '"+keystoreName+"' does not contain a certificate chain with alias'"+alias+"'.");
            }
            return certs;
        } catch (KeyStoreException e) {
            throw new KeystoreException("Unable to read certificate chain from keystore", e);
        }
View Full Code Here

    public PrivateKey getPrivateKey(String alias, char[] storePassword, char[] keyPasswordthrows KeyNotFoundException, KeystoreException, KeystoreIsLocked {
        ensureLoaded(storePassword);
        try {
            PrivateKey key = (PrivateKey) keystore.getKey(alias, keyPassword);
            if (key == null) {
                throw new KeyNotFoundException("Keystore '"+keystoreName+"' does not contain a private key with alias'"+alias+"'.");
            }
            return key;
        } catch (KeyStoreException e) {
            throw new KeystoreException("Unable to retrieve private key from keystore", e);
        } catch (NoSuchAlgorithmException e) {
View Full Code Here

    public Certificate getCertificate(String alias, char[] storePassword) throws KeystoreIsLocked, KeyNotFoundException, KeystoreException {
        ensureLoaded(storePassword);
        try {
            Certificate cert = keystore.getCertificate(alias);
            if (cert == null) {
                throw new KeyNotFoundException("Keystore '"+keystoreName+"' does not contain a certificate with alias'"+alias+"'.");
            }
            return cert;
        } catch (KeyStoreException e) {
            throw new KeystoreException("Unable to retrieve certificate from keystore", e);
        }
View Full Code Here

    public String getCertificateAlias(Certificate cert, char[] storePassword) throws KeystoreException {
        ensureLoaded(storePassword);
        try {
            String alias = keystore.getCertificateAlias(cert);
            if (alias == null) {
                throw new KeyNotFoundException("Keystore '"+keystoreName+"' does not contain an alias corresponding to the given certificate.");
            }
            return alias;
        } catch (KeyStoreException e) {
            throw new KeystoreException("Unable to read certificate alias from keystore", e);
        }
View Full Code Here

    public Certificate[] getCertificateChain(String alias, char[] storePassword) throws KeystoreException {
        ensureLoaded(storePassword);
        try {
            Certificate[] certs = keystore.getCertificateChain(alias);
            if (certs == null) {
                throw new KeyNotFoundException("Keystore '"+keystoreName+"' does not contain a certificate chain with alias'"+alias+"'.");
            }
            return certs;
        } catch (KeyStoreException e) {
            throw new KeystoreException("Unable to read certificate chain from keystore", e);
        }
View Full Code Here

    public PrivateKey getPrivateKey(String alias, char[] storePassword, char[] keyPasswordthrows KeyNotFoundException, KeystoreException, KeystoreIsLocked {
        ensureLoaded(storePassword);
        try {
            PrivateKey key = (PrivateKey) keystore.getKey(alias, keyPassword);
            if (key == null) {
                throw new KeyNotFoundException("Keystore '"+keystoreName+"' does not contain a private key with alias'"+alias+"'.");
            }
            return key;
        } catch (KeyStoreException e) {
            throw new KeystoreException("Unable to retrieve private key from keystore", e);
        } catch (NoSuchAlgorithmException e) {
View Full Code Here

    public Certificate getCertificate(String alias, char[] storePassword) throws KeystoreIsLocked, KeyNotFoundException, KeystoreException {
        ensureLoaded(storePassword);
        try {
            Certificate cert = keystore.getCertificate(alias);
            if (cert == null) {
                throw new KeyNotFoundException("Keystore '"+keystoreName+"' does not contain a certificate with alias'"+alias+"'.");
            }
            return cert;
        } catch (KeyStoreException e) {
            throw new KeystoreException("Unable to retrieve certificate from keystore", e);
        }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.management.geronimo.KeyNotFoundException

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.