cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1380248 - in /cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers: AbstractBindingBuilder.java AsymmetricBindingHandler.java SymmetricBindingHandler.java
Date Mon, 03 Sep 2012 14:31:36 GMT
Author: coheigea
Date: Mon Sep  3 14:31:36 2012
New Revision: 1380248

URL: http://svn.apache.org/viewvc?rev=1380248&view=rev
Log:
Merged revisions 1380244 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1380244 | coheigea | 2012-09-03 15:24:41 +0100 (Mon, 03 Sep 2012) | 2 lines

  Properly log exceptions in the WS-SecurityPolicy layer

........

Modified:
    cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
    cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
    cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java

Modified: cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java?rev=1380248&r1=1380247&r2=1380248&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
Mon Sep  3 14:31:36 2012
@@ -286,7 +286,9 @@ public abstract class AbstractBindingBui
                 }
             }
         }
-        throw new PolicyException(reason);
+        if (!assertion.isOptional()) {
+            throw new PolicyException(new Message(reason.getMessage(), LOG));
+        }
     }
     
     protected void policyNotAsserted(Assertion assertion, String reason) {

Modified: cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java?rev=1380248&r1=1380247&r2=1380248&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
Mon Sep  3 14:31:36 2012
@@ -280,7 +280,7 @@ public class AsymmetricBindingHandler ex
                 try {
                     addSupportingTokens(sigParts);
                 } catch (WSSecurityException ex) {
-                    policyNotAsserted(encryptionToken, ex.getMessage());
+                    policyNotAsserted(encryptionToken, ex);
                 }
             } else {
                 addSignatureConfirmation(sigParts);
@@ -438,7 +438,7 @@ public class AsymmetricBindingHandler ex
                     this.addEncryptedKeyElement(encryptedKeyElement);
                     return encr;
                 } catch (WSSecurityException e) {
-                    policyNotAsserted(recToken, e.getMessage());
+                    policyNotAsserted(recToken, e);
                 }    
             }
         }

Modified: cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java?rev=1380248&r1=1380247&r2=1380248&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
Mon Sep  3 14:31:36 2012
@@ -593,7 +593,7 @@ public class SymmetricBindingHandler ext
                     }
                     return encr;
                 } catch (WSSecurityException e) {
-                    policyNotAsserted(recToken, e.getMessage());
+                    policyNotAsserted(recToken, e);
                 }    
             }
         }



Mime
View raw message