Package com.sun.xml.ws.security.impl.policyconv

Examples of com.sun.xml.ws.security.impl.policyconv.SignatureTargetCreator


        while (i.hasNext()) {
            SecurityPolicy primaryPolicy = (SecurityPolicy) i.next();
            if(PolicyTypeUtil.signaturePolicy(primaryPolicy)){
                SignaturePolicy sigPolicy = (SignaturePolicy)primaryPolicy;
                IntegrityAssertionProcessor iAP = new IntegrityAssertionProcessor(scp.getAlgorithmSuite(), true);
                SignatureTargetCreator stc = iAP.getTargetCreator();
                SignatureTarget sigTarget = stc.newURISignatureTarget(sigPolicy.getUUID());
                SecurityPolicyUtil.setName(sigTarget, sigPolicy);
                spFB.addTargetBinding(sigTarget);
                spFB.isEndorsingSignature(true);
                addedSigTarget = true;
                break;
            }
        }

        // If no primary signature (e.g. TransportBinding), sign the
        // TimeStamp.
        if (!addedSigTarget){
            List sList = policy.getSecondaryPolicies();
            Iterator j = sList.iterator();
            while (j.hasNext()) {
                SecurityPolicy secPolicy = (SecurityPolicy) j.next();
                if(PolicyTypeUtil.timestampPolicy(secPolicy)){
                    TimestampPolicy tsPolicy = (TimestampPolicy)secPolicy;
                    IntegrityAssertionProcessor iAP = new IntegrityAssertionProcessor(scp.getAlgorithmSuite(), true);
                    SignatureTargetCreator stc = iAP.getTargetCreator();
                    SignatureTarget sigTarget = stc.newURISignatureTarget(tsPolicy.getUUID());
                    SecurityPolicyUtil.setName(sigTarget, tsPolicy);
                    spFB.addTargetBinding(sigTarget);
                    spFB.isEndorsingSignature(true);
                    addedSigTarget = true;
                    break;
View Full Code Here

TOP

Related Classes of com.sun.xml.ws.security.impl.policyconv.SignatureTargetCreator

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.