I've got a one-line fix. In the old code, when no passwordtype was given (
i.e. it was null), the passwordtype was assumed to be of the DIGEST type.
I've made this more obvious by making the default value in RequestData be
DIGEST. The testsuite runs, but I am not so sure if all existing code
will handle this graciously. Maybe someone can help me out here?
Patch attached,

Regards,

Marcel Ammerlaan.

On Jan 7, 2008 2:01 PM, Marcel Ammerlaan <[EMAIL PROTECTED]> wrote:

> Hi,
>
> On Jan 7, 2008 3:57 AM, Ruchith Fernando <[EMAIL PROTECTED]>
> wrote:
>
> > This patch causes a test failure. Please fix it and attach the patch
>
>
> Took me some time, but with the extended policy inplace, I can actually
> run the test. First impression: Axis2 is setting the password type to null,
> so the
> cause is clear. In the old situation, a null password was interpreted as
> an actual type being set. In the new situation, null is interpreted as no
> password
> needed.... I will look into it.
>
> Regards,
>
> Marcel Ammerlaan.
>
>
>
Index: org/apache/ws/security/handler/RequestData.java
===================================================================
--- org/apache/ws/security/handler/RequestData.java	(revision 609085)
+++ org/apache/ws/security/handler/RequestData.java	(working copy)
@@ -1,6 +1,7 @@
 package org.apache.ws.security.handler;
 
 import org.apache.ws.security.SOAPConstants;
+import org.apache.ws.security.WSConstants;
 import org.apache.ws.security.WSSConfig;
 import org.apache.ws.security.components.crypto.Crypto;
 import org.apache.ws.security.message.WSSecHeader;
@@ -19,7 +20,7 @@
     private SOAPConstants soapConstants = null;
     private String actor = null;
     private String username = null;
-    private String pwType = null;
+    private String pwType = WSConstants.PASSWORD_DIGEST; // Make this the default when no password type is given.
     private String[] utElements = null;
     private Crypto sigCrypto = null;
     private Crypto decCrypto = null;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to