cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1102300 - /cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
Date Thu, 12 May 2011 13:45:38 GMT
Author: coheigea
Date: Thu May 12 13:45:38 2011
New Revision: 1102300

URL: http://svn.apache.org/viewvc?rev=1102300&view=rev
Log:
Don't send a KeyType if one is being sent in the template.

Modified:
    cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java

Modified: cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java?rev=1102300&r1=1102299&r2=1102300&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
Thu May 12 13:45:38 2011
@@ -484,10 +484,12 @@ public class STSClient implements Config
         if (sptt == null) {
             addTokenType(writer);
         }
+        if (isSecureConv) {
+            addLifetime(writer);
+        }
         if (keyTypeTemplate == null) {
-            keyTypeTemplate = keyType;
+            keyTypeTemplate = writeKeyType(writer, keyType);
         }
-        keyTypeTemplate = writeKeyType(writer, keyTypeTemplate);
 
         byte[] requestorEntropy = null;
         X509Certificate cert = null;
@@ -792,7 +794,6 @@ public class STSClient implements Config
     private String writeKeyType(W3CDOMStreamWriter writer, String keyTypeToWrite) 
         throws XMLStreamException {
         if (isSecureConv) {
-            addLifetime(writer);
             if (keyTypeToWrite == null) {
                 writer.writeStartElement("wst", "TokenType", namespace);
                 writer.writeCharacters(STSUtils.getTokenTypeSCT(namespace));



Mime
View raw message