Package org.wso2.xkms2.client

Examples of org.wso2.xkms2.client.XKMSStubHelper


        if (pop != null && key != null) {
            try {
                pop.checkSignatureValue(key);
            } catch (XMLSignatureException se) {
                throw new XKMSException(
                        "Proof-Of-Pocession varification failed", se);
            }
        }

    }
View Full Code Here


                proofOfPossession.checkSignatureValue(key);

            } catch (XMLSignatureException e) {
                LOG.error("", e);

                throw new XKMSException(
                        XKMSException.PROOF_OF_POSSESSION_REQUIRED,
                        "popRequired", e);
            }
        }
    }
View Full Code Here

        Key keyBindingAuthenticationKey = authentication
                .getKeyBindingAuthenticationKey();
        try {
            if (!keyBindingAuthentication
                    .checkSignatureValue(keyBindingAuthenticationKey)) {
                throw new XKMSException(XKMSException.NO_AUTHENTICATION,
                        "invalidXMLSign");
            }
            System.out.println("success");
        } catch (XMLSignatureException e) {
            LOG.error("", e);
            throw new XKMSException(XKMSException.NO_AUTHENTICATION,
                    "invalidXMLSign", e);
        }
    }
View Full Code Here

            try {
                signature.checkSignatureValue(x509Certificate);
            } catch (XMLSignatureException e) {
                LOG.error("", e);
                throw new XKMSException(XKMSException.NO_AUTHENTICATION,
                        "failedXMLSign", e);
            }
        }
    }
View Full Code Here

                String storePass = properties
                        .getProperty(XKMS_KEY_STORE_PASSWORD);
                keystore.store(outputStream, storePass.toCharArray());

            } catch (FileNotFoundException ex) {
                throw new XKMSException(ex);
            } catch (KeyStoreException e) {
                throw new XKMSException(e);
            } catch (NoSuchAlgorithmException e) {
                throw new XKMSException(e);
            } catch (CertificateException e) {
                throw new XKMSException(e);
            } catch (IOException e) {
                throw new XKMSException(e);
            }
        }
    }
View Full Code Here

                        return alias;
                    }
                }
            }
        } catch (KeyStoreException e) {
            throw new XKMSException("keystore");
        }
        return null;
    }
View Full Code Here

                        aliases.add(alias);
                    }
                }
            }
        } catch (KeyStoreException e) {
            throw new XKMSException(e);
        }
        return aliases;
    }
View Full Code Here

                } else {
                    certFact = CertificateFactory
                            .getInstance("X.509", provider);
                }
            } catch (CertificateException e) {
                throw new XKMSException("unsupportedCertType");

            } catch (NoSuchProviderException e) {
                throw new XKMSException("noSecProvider");
            }
        }

        return certFact;
    }
View Full Code Here

            } else {
                validator = CertPathValidator.getInstance("PKIX", provider);
            }
            validator.validate(path, param);
        } catch (java.security.NoSuchProviderException e) {
            throw new XKMSException("certpath");
        } catch (java.security.NoSuchAlgorithmException e) {
            throw new XKMSException("certpath");
        } catch (java.security.cert.CertificateException e) {
            throw new XKMSException("certpath");
        } catch (java.security.InvalidAlgorithmParameterException e) {
            throw new XKMSException("certpath");
        } catch (java.security.cert.CertPathValidatorException e) {
            throw new XKMSException("certpath");
        } catch (java.security.KeyStoreException e) {
            throw new XKMSException("certpath");
        }

        return true;
    }
View Full Code Here

            } else {
                return (X509Certificate) certs[0];

            }
        } catch (KeyStoreException e) {
            throw new XKMSException("keystore");
        }
    }
View Full Code Here

TOP

Related Classes of org.wso2.xkms2.client.XKMSStubHelper

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.