Package com.sun.xml.wss.impl

Examples of com.sun.xml.wss.impl.XWSSecurityRuntimeException


                PrivateKey ret = getPrivateKey(context, this.myAlias);
                return ret;
            }
        } catch (XWSSecurityException ex) {
            //TODO: log here
            throw new XWSSecurityRuntimeException(ex);
        }
        //TODO: Log here
        throw new XWSSecurityRuntimeException("Could not locate Matching Private Key for: " + publicKey);
       
    }
View Full Code Here


            });
       
        } catch (Exception e) {
            log.log(Level.SEVERE, LogStringsMessages.WSS_0216_CALLBACKHANDLER_HANDLE_EXCEPTION("CallerPrincipalCallback"),
                    new Object[]{"CallerPrincipalCallback"});
            throw new XWSSecurityRuntimeException(e);
        }
    }
View Full Code Here

                }
                KeyInfo keyInfo = new KeyInfo(keyInfoElem, "MessageConstants.DSIG_NS");
                return new KeyInfoHeaderBlock(keyInfo);
            }          
        } catch (XWSSecurityException ex) {
            throw new XWSSecurityRuntimeException("Error while extracting KeyInfo", ex);
        } catch (XMLSecurityException ex) {
            throw new XWSSecurityRuntimeException("Error while extracting KeyInfo", ex);
        }
    }
View Full Code Here

                        return cert;
                    }
                }
            } catch (XWSSecurityException ex) {
                log.log(Level.SEVERE, null, ex);
                throw new XWSSecurityRuntimeException(ex);
            }
        }
        return null;
    }
View Full Code Here

        if (obj instanceof PrivateKey) {
            return (PrivateKey)obj;
        } else {
            if (obj != null) {
                log.log(Level.SEVERE,"value of PRIVATEKEY_PROPERTY is not a PrivateKey" );
                throw new XWSSecurityRuntimeException("value of PRIVATEKEY_PROPERTY is not a PrivateKey");
            }
        }
        return null;
    }
View Full Code Here

                fault.appendFaultSubcode(sfe.getFaultCode());
            } else {
                fault = soapFactory.createFault(reasonText, sfe.getFaultCode());
            }
        } catch (Exception e) {
            throw new XWSSecurityRuntimeException(e);
        }
        return fault;
    }
View Full Code Here

                fault.appendFaultSubcode(faultCode);
            } else {
                fault = soapFactory.createFault(faultString, faultCode);
            }
        } catch (Exception e) {
            throw new XWSSecurityRuntimeException(e);
        }
        return fault;
    }
View Full Code Here

            JAXBElement<SecurityContextTokenType> sct =
                      new com.sun.xml.ws.security.secconv.impl.wssx.bindings.ObjectFactory().createSecurityContextToken(this);
            Marshaller writer = getMarshaller();
            writer.marshal(sct, os);
        } catch (javax.xml.bind.JAXBException ex) {
            throw new XWSSecurityRuntimeException(ex);
        }
    }
View Full Code Here

        if(_rsaSignature == null ){
            try {
                _rsaSignature = Signature.getInstance(signatureAlgo);
            } catch (NoSuchAlgorithmException ex) {
                // shud never come here
                throw new XWSSecurityRuntimeException(ex);
            }
        }
       
        _rsaSignature.initSign((PrivateKey) privateKey);
       
        SignerOutputStream signerOutputStream = new SignerOutputStream(_rsaSignature);
        Marshaller marshaller;
        try {
            marshaller = getMarshaller();
            _exc14nCanonicalizer.reset();
           
            setNamespaceAndPrefixList();
           
            _exc14nCanonicalizer.setStream(signerOutputStream);
            marshaller.marshal(signedInfo,_exc14nCanonicalizer);
            if(logger.isLoggable(Level.FINEST)){
                java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream();
                _exc14nCanonicalizer.reset();
                _exc14nCanonicalizer.setStream(baos);
                marshaller.marshal(signedInfo,_exc14nCanonicalizer);
                logger.log(Level.FINEST, LogStringsMessages.WSS_1756_CANONICALIZED_SIGNEDINFO_VALUE(baos.toString()));
            }
        } catch (JAXBException ex) {
            throw new XWSSecurityRuntimeException(ex);
        }
       
       
        try {
            return _rsaSignature.sign();
View Full Code Here

                _exc14nCanonicalizer.setStream(bos);
                marshaller.marshal(signedInfo,_exc14nCanonicalizer);
                logger.log(Level.FINEST, LogStringsMessages.WSS_1756_CANONICALIZED_SIGNEDINFO_VALUE(bos.toString()));
            }
        } catch (JAXBException ex) {
            throw new XWSSecurityRuntimeException(ex);
        }
        try {
            return hmac.sign();
           
        } catch (SignatureException se) {
View Full Code Here

TOP

Related Classes of com.sun.xml.wss.impl.XWSSecurityRuntimeException

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.