m_log.error("Unable to load key file "+fileName, e);
m_log.debug("Unable to load key file "+fileName+". Exception: "+e.getMessage());
    private boolean loadFromKeyStore(Admin adm, String fileName) {        final Enumeration eAlias;        final KeyStore keyStore;        try {            KeyStore tmpKeyStore;            try {                tmpKeyStore = KeyStore.getInstance("JKS");                tmpKeyStore.load(new FileInputStream(fileName), mStorePassword);            } catch( IOException e ) {                tmpKeyStore = KeyStore.getInstance("PKCS12", "BC");                tmpKeyStore.load(new FileInputStream(fileName), mStorePassword);            }            keyStore = tmpKeyStore;            eAlias = keyStore.aliases();        } catch( Exception e ) {            m_log.error("Unable to load key file "+fileName, e);            return false;        }        while( eAlias.hasMoreElements() ) {            final String alias = (String)eAlias.nextElement();            try {                final PrivateKey key = (PrivateKey)keyStore.getKey(alias, mKeyPassword);                final X509Certificate cert = (X509Certificate)keyStore.getCertificate(alias);                if ( key!=null && cert!=null )                    putSignEntity(new PrivateKeyFactorySW(key), cert, adm, "BC");            } catch (Exception e) {                m_log.error("Unable to get alias "+alias+" in file "+fileName+". Exception: ", e);            }        }        return true;    }