Package org.apache.cxf.fediz.core.exception

Examples of org.apache.cxf.fediz.core.exception.IllegalConfigurationException


                crypto = CryptoFactory.getInstance(sigProperties);
                tm.setCrypto(crypto);
                certificateStores.add(tm);
            } catch (WSSecurityException e) {
                LOG.error("Failed to load keystore '" + tm.getName() + "'", e);
                throw new IllegalConfigurationException("Failed to load keystore '" + tm.getName() + "'");
            }
        }
        return certificateStores;
    }
View Full Code Here


            crypto = CryptoFactory.getInstance(sigProperties);
            keyManager.setCrypto(crypto);
        } catch (WSSecurityException e) {
            keyManager = null;
            LOG.error("Failed to load keystore '" + keyManager.getName() + "'", e);
            throw new IllegalConfigurationException("Failed to load keystore '" + keyManager.getName() + "'");
        }
       
        return keyManager;
       
    }
View Full Code Here

                crypto = CryptoFactory.getInstance(sigProperties);
                tm.setCrypto(crypto);
                certificateStores.add(tm);
            } catch (WSSecurityException e) {
                LOG.error("Failed to load keystore '" + tm.getName() + "'", e);
                throw new IllegalConfigurationException("Failed to load keystore '" + tm.getName() + "'");
            }
        }
        return certificateStores;
    }
View Full Code Here

            crypto = CryptoFactory.getInstance(sigProperties);
            keyManager.setCrypto(crypto);
        } catch (WSSecurityException e) {
            keyManager = null;
            LOG.error("Failed to load keystore '" + keyManager.getName() + "'", e);
            throw new IllegalConfigurationException("Failed to load keystore '" + keyManager.getName() + "'");
        }
       
        return keyManager;
       
    }
View Full Code Here

                }
                tm.setCrypto(crypto);
                certificateStores.add(tm);
            } catch (WSSecurityException e) {
                LOG.error("Failed to load keystore '" + tm.getName() + "'", e);
                throw new IllegalConfigurationException("Failed to load keystore '" + tm.getName() + "'");
            }
        }
        return certificateStores;
    }
View Full Code Here

            crypto = CryptoFactory.getInstance(sigProperties);
            keyManager.setCrypto(crypto);
        } catch (WSSecurityException e) {
            keyManager = null;
            LOG.error("Failed to load keystore '" + keyManager.getName() + "'", e);
            throw new IllegalConfigurationException("Failed to load keystore '" + keyManager.getName() + "'");
        }
       
        return keyManager;
       
    }
View Full Code Here

            crypto = CryptoFactory.getInstance(decProperties);
            decryptionKeyManager.setCrypto(crypto);
        } catch (WSSecurityException e) {
            decryptionKeyManager = null;
            LOG.error("Failed to load keystore '" + decryptionKeyManager.getName() + "'", e);
            throw new IllegalConfigurationException("Failed to load keystore '" + decryptionKeyManager.getName() + "'");
        }
       
        return decryptionKeyManager;
       
    }
View Full Code Here

        if (!f.exists() && getRelativePath() != null && !getRelativePath().isEmpty()) {
            trustStoreFile = getRelativePath().concat(File.separator + trustStoreFile);
        }
       
        if (trustStoreFile == null || trustStoreFile.isEmpty()) {
            throw new IllegalConfigurationException("truststoreFile not configured");
        }
        if (trustStorePw == null || trustStorePw.isEmpty()) {
            throw new IllegalConfigurationException("trustStorePw not configured");
        }
        Properties p = new Properties();
        p.put("org.apache.ws.security.crypto.provider",
                "org.apache.ws.security.components.crypto.Merlin");
        p.put("org.apache.ws.security.crypto.merlin.keystore.type", "jks");
View Full Code Here

        if (!f.exists() && getRelativePath() != null && !getRelativePath().isEmpty()) {
            keyStoreFile = getRelativePath().concat(File.separator + keyStoreFile);
        }
       
        if (keyStoreFile == null || keyStoreFile.isEmpty()) {
            throw new IllegalConfigurationException("truststoreFile not configured");
        }
        if (keyStorePw == null || keyStorePw.isEmpty()) {
            throw new IllegalConfigurationException("trustStorePw not configured");
        }
        if (ks.getType() != null) {
            keyType = ks.getType();
        }
       
View Full Code Here

            if (bis.available() > 0) {
                cert = cf.generateCertificate(bis);
                if (!(cert instanceof X509Certificate)) {
                    LOG.error("Certificate " + filename + " is not of type X509Certificate");
                    throw new IllegalConfigurationException("Certificate "
                                                            + filename + " is not of type X509Certificate");
                }
                if (bis.available() > 0) {
                    LOG.warn("There are more certificates configured in " + filename + ". Only first is parsed");
                }
                return (X509Certificate)cert;   
            } else  {
                LOG.error("No bytes can be read in certificate file " + filename);
                throw new IllegalConfigurationException("No bytes can be read in certificate file " + filename);
            }
        } catch (IllegalConfigurationException ex) {
            throw ex;
        } catch (Exception ex) {
            LOG.error("Failed to read certificate file " + filename, ex);
            throw new IllegalConfigurationException("Failed to read certificate file " + filename, ex);
        } finally {
            try {
                bis.close();
            } catch (IOException ex) {
                LOG.error("Failed to close certificate file " + filename, ex);
View Full Code Here

TOP

Related Classes of org.apache.cxf.fediz.core.exception.IllegalConfigurationException

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.