Examples of ExcC14NParameterSpec


Examples of com.sun.xml.ws.security.opt.impl.dsig.ExcC14NParameterSpec

     * @throws com.sun.xml.wss.XWSSecurityException
     */
    private Transform processTransform(XMLStreamReader reader,String uri) throws XWSSecurityException{
        try{
           
            ExcC14NParameterSpec exc14nSpec = null;           
            String value = reader.getAttributeValue(null,"Algorithm");
            if(EXC14N_NS.equals(value)){
                exc14nSpec = readEXC14nTransform(reader);
                return (Transform) signatureFactory.newTransform(value,exc14nSpec);
            }else if(Transform.ENVELOPED.equals(value)){
View Full Code Here

Examples of com.sun.xml.ws.security.opt.impl.dsig.ExcC14NParameterSpec

     * @throws javax.xml.stream.XMLStreamException
     */
    @SuppressWarnings("unchecked")
    private ExcC14NParameterSpec readEXC14nTransform(XMLStreamReader reader) throws XMLStreamException{
        String prefixList = "";
        ExcC14NParameterSpec exc14nSpec = null;
        if(reader.hasNext()){
            reader.next();
            if(StreamUtil.isStartElement(reader) && reader.getLocalName() == INCLUSIVENAMESPACES){               
                prefixList = reader.getAttributeValue(null,"PrefixList");
                String [] pl = null;
                if(prefixList != null && prefixList.length() >0){
                    pl = prefixList.split(" ");
                }
                if(pl != null && pl.length >0){
                    ArrayList prefixs = new ArrayList();
                    for(int i=0;i< pl.length ;i++){
                        prefixs.add(pl[i]);
                    }
                    exc14nSpec = new ExcC14NParameterSpec(prefixs);
                }
                if(reader.hasNext()){
                    reader.next();                   
                }
            }
View Full Code Here

Examples of com.sun.xml.ws.security.opt.impl.dsig.ExcC14NParameterSpec

            logger.log(Level.SEVERE, LogStringsMessages.WSS_1714_UNSUPPORTED_TRANSFORM_ERROR());
            throw new XWSSecurityException("Only EXC14n Transform is supported");
        }
        Transform tr = (Transform) trList.get(0);
       
        ExcC14NParameterSpec spec = (ExcC14NParameterSpec)tr.getParameterSpec();
        if(spec != null){
            canonicalizer.setInclusivePrefixList(spec.getPrefixList());
        }
        if(parentNS != null && parentNS.size() >0){
            Iterator<Map.Entry<String, String>> itr = parentNS.entrySet().iterator();
           
            while(itr.hasNext()){
View Full Code Here

Examples of javax.xml.crypto.dsig.spec.ExcC14NParameterSpec

        if (algorithm == null) {
            throw new IllegalArgumentException("algorithm is null");
        }
        XmlSignatureTransform canonicalizationMethod = new XmlSignatureTransform(algorithm);
        if (inclusiveNamespacePrefixes != null) {
            ExcC14NParameterSpec parameters = new ExcC14NParameterSpec(inclusiveNamespacePrefixes);
            canonicalizationMethod.setParameterSpec(parameters);
        }
        return canonicalizationMethod;
    }
View Full Code Here

Examples of javax.xml.crypto.dsig.spec.ExcC14NParameterSpec

        try {
            C14NMethodParameterSpec c14nSpec = null;
            if (getWsConfig().isWsiBSPCompliant() && canonAlgo.equals(WSConstants.C14N_EXCL_OMIT_COMMENTS)) {
                List<String> prefixes =
                    getInclusivePrefixes(secHeader.getSecurityHeader(), false);
                c14nSpec = new ExcC14NParameterSpec(prefixes);
            }
           
           c14nMethod = signatureFactory.newCanonicalizationMethod(canonAlgo, c14nSpec);
        } catch (Exception ex) {
            log.error("", ex);
View Full Code Here

Examples of javax.xml.crypto.dsig.spec.ExcC14NParameterSpec

      end = prefixListAttr.indexOf(' ', begin);
  }
  if (begin <= prefixListAttr.length()) {
            prefixList.add(prefixListAttr.substring(begin));
        }
  this.params = new ExcC14NParameterSpec(prefixList);
    }
View Full Code Here

Examples of javax.xml.crypto.dsig.spec.ExcC14NParameterSpec

  } else {
      excElem.setAttributeNS("http://www.w3.org/2000/xmlns/",
    "xmlns:" + prefix, CanonicalizationMethod.EXCLUSIVE);
  }

  ExcC14NParameterSpec params = (ExcC14NParameterSpec) spec;
  StringBuffer prefixListAttr = new StringBuffer("");
  List prefixList = params.getPrefixList();
  for (int i = 0, size = prefixList.size(); i < size; i++) {
      prefixListAttr.append((String) prefixList.get(i));
      if (i < size - 1) {
    prefixListAttr.append(" ");
      }
View Full Code Here

Examples of javax.xml.crypto.dsig.spec.ExcC14NParameterSpec

  } else {
      excElem.setAttributeNS("http://www.w3.org/2000/xmlns/",
    "xmlns:" + prefix, CanonicalizationMethod.EXCLUSIVE);
  }

  ExcC14NParameterSpec params = (ExcC14NParameterSpec) spec;
  StringBuffer prefixListAttr = new StringBuffer("");
  List prefixList = params.getPrefixList();
  for (int i = 0, size = prefixList.size(); i < size; i++) {
      prefixListAttr.append((String) prefixList.get(i));
      if (i < size - 1) {
    prefixListAttr.append(" ");
      }
View Full Code Here

Examples of javax.xml.crypto.dsig.spec.ExcC14NParameterSpec

        try {
            C14NMethodParameterSpec c14nSpec = null;
            if (getWsConfig().isWsiBSPCompliant() && canonAlgo.equals(WSConstants.C14N_EXCL_OMIT_COMMENTS)) {
                List<String> prefixes =
                    getInclusivePrefixes(secHeader.getSecurityHeader(), false);
                c14nSpec = new ExcC14NParameterSpec(prefixes);
            }
           
           c14nMethod = signatureFactory.newCanonicalizationMethod(canonAlgo, c14nSpec);
        } catch (Exception ex) {
            log.error("", ex);
View Full Code Here

Examples of javax.xml.crypto.dsig.spec.ExcC14NParameterSpec

        try {
            C14NMethodParameterSpec c14nSpec = null;
            if (getWsConfig().isWsiBSPCompliant() && canonAlgo.equals(WSConstants.C14N_EXCL_OMIT_COMMENTS)) {
                List<String> prefixes =
                    getInclusivePrefixes(secHeader.getSecurityHeader(), false);
                c14nSpec = new ExcC14NParameterSpec(prefixes);
            }
           
           c14nMethod = signatureFactory.newCanonicalizationMethod(canonAlgo, c14nSpec);
        } catch (Exception ex) {
            log.error("", ex);
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.