cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [3/3] cxf git commit: Fixing backmerge
Date Thu, 02 Jul 2015 15:09:21 GMT
Fixing backmerge


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/6e721a5a
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/6e721a5a
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/6e721a5a

Branch: refs/heads/3.0.x-fixes
Commit: 6e721a5a3486df0c8990fdf2fafe09ebf88a4790
Parents: 8b16797
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Thu Jul 2 16:09:09 2015 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Thu Jul 2 16:09:09 2015 +0100

----------------------------------------------------------------------
 .../rs/security/saml/sso/MetadataWriter.java    | 39 --------------------
 1 file changed, 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/6e721a5a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataWriter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataWriter.java
b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataWriter.java
index d413e72..303fa27 100644
--- a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataWriter.java
+++ b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataWriter.java
@@ -19,14 +19,6 @@
 
 package org.apache.cxf.rs.security.saml.sso;
 
-<<<<<<< HEAD
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-=======
->>>>>>> fdab617... Switch to use W3CDOMStreamWriter for SAML SSO Metadata
 import java.net.MalformedURLException;
 import java.security.Key;
 import java.security.cert.CertificateEncodingException;
@@ -49,18 +41,13 @@ import javax.xml.crypto.dsig.keyinfo.KeyInfoFactory;
 import javax.xml.crypto.dsig.keyinfo.X509Data;
 import javax.xml.crypto.dsig.spec.C14NMethodParameterSpec;
 import javax.xml.crypto.dsig.spec.TransformParameterSpec;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.stream.XMLOutputFactory;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamWriter;
 
 import org.w3c.dom.Document;
 
-<<<<<<< HEAD
-=======
 import org.apache.cxf.staxutils.W3CDOMStreamWriter;
 import org.apache.wss4j.common.util.DOM2Writer;
->>>>>>> fdab617... Switch to use W3CDOMStreamWriter for SAML SSO Metadata
 import org.apache.xml.security.stax.impl.util.IDGenerator;
 import org.apache.xml.security.utils.Base64;
 import org.slf4j.Logger;
@@ -70,14 +57,8 @@ public class MetadataWriter {
     
     private static final Logger LOG = LoggerFactory.getLogger(MetadataWriter.class);
     
-    private static final XMLOutputFactory XML_OUTPUT_FACTORY = XMLOutputFactory.newInstance();
-    private static final DocumentBuilderFactory DOC_BUILDER_FACTORY = DocumentBuilderFactory.newInstance();
     private static final XMLSignatureFactory XML_SIGNATURE_FACTORY = XMLSignatureFactory.getInstance("DOM");
     
-    static {
-        DOC_BUILDER_FACTORY.setNamespaceAware(true);
-    }
-
     //CHECKSTYLE:OFF
     public Document getMetaData(
         String serviceURL,
@@ -88,13 +69,7 @@ public class MetadataWriter {
         boolean wantRequestsSigned
     ) throws Exception {
 
-<<<<<<< HEAD
-        ByteArrayOutputStream bout = new ByteArrayOutputStream(4096);
-        Writer streamWriter = new OutputStreamWriter(bout, "UTF-8");
-        XMLStreamWriter writer = XML_OUTPUT_FACTORY.createXMLStreamWriter(streamWriter);
-=======
         W3CDOMStreamWriter writer = new W3CDOMStreamWriter();
->>>>>>> fdab617... Switch to use W3CDOMStreamWriter for SAML SSO Metadata
 
         writer.writeStartDocument("UTF-8", "1.0");
 
@@ -123,20 +98,12 @@ public class MetadataWriter {
             LOG.debug("***************** unsigned ****************");
         }
 
-<<<<<<< HEAD
-        InputStream is = new ByteArrayInputStream(bout.toByteArray());
-=======
         Document doc = writer.getDocument();
->>>>>>> fdab617... Switch to use W3CDOMStreamWriter for SAML SSO Metadata
 
         if (signingKey != null) {
             return signMetaInfo(signingCert, signingKey, doc, referenceID);
         }
-<<<<<<< HEAD
-        return DOC_BUILDER_FACTORY.newDocumentBuilder().parse(is);
-=======
         return doc;
->>>>>>> fdab617... Switch to use W3CDOMStreamWriter for SAML SSO Metadata
     }
     
     private void writeSAMLMetadata(
@@ -266,12 +233,6 @@ public class MetadataWriter {
         X509Data xd = kif.newX509Data(x509Content);
         KeyInfo ki = kif.newKeyInfo(Collections.singletonList(xd));
 
-<<<<<<< HEAD
-        // Instantiate the document to be signed.
-        Document doc = DOC_BUILDER_FACTORY.newDocumentBuilder().parse(metaInfo);
-
-=======
->>>>>>> fdab617... Switch to use W3CDOMStreamWriter for SAML SSO Metadata
         // Create a DOMSignContext and specify the RSA PrivateKey and
         // location of the resulting XMLSignature's parent element.
         //DOMSignContext dsc = new DOMSignContext(keyEntry.getPrivateKey(), doc.getDocumentElement());


Mime
View raw message