dims 2005/06/02 04:40:20
Modified: wss4j build.xml
wss4j/src/org/apache/ws/security/conversation
ConversationManager.java
wss4j/test/secconv/components PackageTests.java
TestRSTR.java
Log:
fixes to test cases from ruchith
Revision Changes Path
1.23 +1 -1 ws-fx/wss4j/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/ws-fx/wss4j/build.xml,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- build.xml 1 Jun 2005 10:54:49 -0000 1.22
+++ build.xml 2 Jun 2005 11:40:20 -0000 1.23
@@ -527,7 +527,7 @@
<fileset dir="${build.classes}">
<include name="**/wssec/PackageTests.class"/>
<include name="**/components/PackageTests.class"/>
- <!-- <include
name="**/secconv/components/PackageTests.class"/> -->
+ <include
name="**/secconv/components/PackageTests.class"/>
</fileset>
</batchtest>
</junit>
1.11 +1 -1
ws-fx/wss4j/src/org/apache/ws/security/conversation/ConversationManager.java
Index: ConversationManager.java
===================================================================
RCS file:
/home/cvs/ws-fx/wss4j/src/org/apache/ws/security/conversation/ConversationManager.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- ConversationManager.java 22 Nov 2004 22:45:33 -0000 1.10
+++ ConversationManager.java 2 Jun 2005 11:40:20 -0000 1.11
@@ -93,7 +93,7 @@
// step 1 : Creating wsse:Reference to DerivedKeyToken
Reference ref = new Reference(WSSConfig.getDefaultWSConfig(), doc);
ref.setURI("#" + genID);
-
ref.setValueType("http://schemas.xmlsoap.org/ws/2004/04/security/sc/dk");
+ ref.setValueType(ConversationConstants.TOKEN_TYPE_DERIVED_KEY_TOKEN);
SecurityTokenReference stRef = new
SecurityTokenReference(WSSConfig.getDefaultWSConfig(), doc);
stRef.setReference(ref);
1.3 +0 -17 ws-fx/wss4j/test/secconv/components/PackageTests.java
Index: PackageTests.java
===================================================================
RCS file: /home/cvs/ws-fx/wss4j/test/secconv/components/PackageTests.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- PackageTests.java 11 Aug 2004 06:03:15 -0000 1.2
+++ PackageTests.java 2 Jun 2005 11:40:20 -0000 1.3
@@ -15,23 +15,6 @@
*
*/
-/*
- * Copyright 2003-2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
package secconv.components;
import junit.framework.Test;
1.6 +15 -1 ws-fx/wss4j/test/secconv/components/TestRSTR.java
Index: TestRSTR.java
===================================================================
RCS file: /home/cvs/ws-fx/wss4j/test/secconv/components/TestRSTR.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- TestRSTR.java 1 Jun 2005 10:54:50 -0000 1.5
+++ TestRSTR.java 2 Jun 2005 11:40:20 -0000 1.6
@@ -52,9 +52,11 @@
import org.apache.ws.security.conversation.message.info.SecurityContextInfo;
import
org.apache.ws.security.conversation.message.token.SecurityContextToken;
import org.apache.ws.security.handler.WSHandlerConstants;
+import org.apache.ws.security.transform.STRTransform;
import
org.apache.ws.security.trust.message.token.RequestSecurityTokenResponse;
import org.apache.ws.security.trust.message.token.RequestedProofToken;
import org.apache.ws.security.util.WSSecurityUtil;
+import org.apache.xml.security.transforms.Transform;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -86,7 +88,19 @@
Crypto crypto = CryptoFactory.getInstance();
static{
- org.apache.xml.security.Init.init();
+ org.apache.xml.security.Init.init();
+ String Id = "BC";
+ if (java.security.Security.getProvider(Id) == null) {
+ log.debug("The provider " + Id
+ + " had to be added to the java.security.Security");
+ java.security.Security.addProvider(new
org.bouncycastle.jce.provider.BouncyCastleProvider());
+ }
+ Transform.init();
+ try {
+ Transform.register(STRTransform.implementedTransformURI,
+ "org.apache.ws.security.transform.STRTransform");
+ } catch (Exception ex) {
+ }
}
//sharedSecret = "SriLankaSriLankaSriLanka".getBytes();