Package org.apache.ws.security.message

Examples of org.apache.ws.security.message.WSSecSignature.computeSignature()


        sig.setParts(sigParts);
        sig.addReferencesToSign(sigParts, secHeader);

        //Do signature
        sig.computeSignature();
        signatures.add(sig.getSignatureValue());

        secHeader.getSecurityHeader().appendChild(sig.getSignatureElement());
    }
    protected void assertSupportingTokens(Vector<WSEncryptionPart> sigs) {
View Full Code Here


            parts.add(encP);
        }
        sign.addReferencesToSign(parts, reqData.getSecHeader());

        try {
            sign.computeSignature();
            reqData.getSignatureValues().add(sign.getSignatureValue());
        } catch (WSSecurityException e) {
            throw new WSSecurityException(
                "WSHandler: Error during UsernameTokenSignature", e
            );
View Full Code Here

            List<javax.xml.crypto.dsig.Reference> referenceList =
                wsSign.addReferencesToSign(reqData.getSignatureParts(), reqData.getSecHeader());

            if (signBST ||
                (reqData.isAppendSignatureAfterTimestamp() && siblingElementToPrepend == null)) {
                wsSign.computeSignature(referenceList, false, null);
            } else {
                wsSign.computeSignature(referenceList, true, siblingElementToPrepend);
            }

            if (!signBST) {
View Full Code Here

            if (signBST ||
                (reqData.isAppendSignatureAfterTimestamp() && siblingElementToPrepend == null)) {
                wsSign.computeSignature(referenceList, false, null);
            } else {
                wsSign.computeSignature(referenceList, true, siblingElementToPrepend);
            }

            if (!signBST) {
                wsSign.prependBSTElementToHeader(reqData.getSecHeader());
            }
View Full Code Here

                    && sig.getBSTTokenId() != null) {
                sigParts.add(new WSEncryptionPart(sig.getBSTTokenId()));
            }

            sig.addReferencesToSign(sigParts, secHeader);
            sig.computeSignature();
            signatures.add(sig.getSignatureValue());

            insertBeforeBottomUp(sig.getSignatureElement());           
            mainSigId = addWsuIdToElement(sig.getSignatureElement());
        }
View Full Code Here

            sig.setParts(sigs);
            List<Reference> referenceList = sig.addReferencesToSign(sigs, secHeader);

            //Do signature
            if (bottomUpElement == null) {
                sig.computeSignature(referenceList, false, null);
            } else {
                sig.computeSignature(referenceList, true, bottomUpElement);
            }
            bottomUpElement = sig.getSignatureElement();
View Full Code Here

            //Do signature
            if (bottomUpElement == null) {
                sig.computeSignature(referenceList, false, null);
            } else {
                sig.computeSignature(referenceList, true, bottomUpElement);
            }
            bottomUpElement = sig.getSignatureElement();

            this.mainSigId = sig.getId();
            return sig.getSignatureValue();
View Full Code Here

            supportingSigParts.add(new WSEncryptionPart(supportingSig.getBSTTokenId()));
        }

        try {
            supportingSig.addReferencesToSign(supportingSigParts, rmd.getSecHeader());
            supportingSig.computeSignature();

            supportingSignatureElement = supportingSig.getSignatureElement();

            this.setInsertionLocation(RampartUtil.insertSiblingAfter(rmd, this
                    .getInsertionLocation(), supportingSignatureElement));
View Full Code Here

            List<javax.xml.crypto.dsig.Reference> referenceList =
                wsSign.addReferencesToSign(reqData.getSignatureParts(), reqData.getSecHeader());

            if (reqData.isAppendSignatureAfterTimestamp() && siblingElementToPrepend == null) {
                wsSign.computeSignature(referenceList, false, null);
            } else {
                wsSign.computeSignature(referenceList, true, siblingElementToPrepend);
            }

            wsSign.prependBSTElementToHeader(reqData.getSecHeader());
View Full Code Here

                wsSign.addReferencesToSign(reqData.getSignatureParts(), reqData.getSecHeader());

            if (reqData.isAppendSignatureAfterTimestamp() && siblingElementToPrepend == null) {
                wsSign.computeSignature(referenceList, false, null);
            } else {
                wsSign.computeSignature(referenceList, true, siblingElementToPrepend);
            }

            wsSign.prependBSTElementToHeader(reqData.getSecHeader());
            reqData.getSignatureValues().add(wsSign.getSignatureValue());
        } catch (WSSecurityException e) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.