dims 2005/06/04 14:13:00
Modified: wss4j build.xml
wss4j/interop/org/apache/ws/axis/oasis Client_deploy.wsdd
PWCallback1.java
wss4j/interop/org/apache/ws/axis/oasis/ping deploy.wsdd
wss4j/interop interop2.jks wsstest.properties
wss4j/src/org/apache/ws/axis/security/trust/secconv/interop
PWCallBackHandler.java
wss4j/interop/keys README.txt
wss4j/test/interop TestInteropKeys.java
TestJAXRPCHandler.java
Log:
Get new certs working in the test harness.
Revision Changes Path
1.24 +1 -1 ws-fx/wss4j/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/ws-fx/wss4j/build.xml,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- build.xml 2 Jun 2005 11:40:20 -0000 1.23
+++ build.xml 4 Jun 2005 21:12:59 -0000 1.24
@@ -638,7 +638,7 @@
</copy>
<copy todir="${build.webapp}/WEB-INF/classes/interop">
<fileset dir="${dir.interop}">
- <include name="**/interop.jks"/>
+ <include name="**/interop2.jks"/>
</fileset>
</copy>
1.25 +15 -15
ws-fx/wss4j/interop/org/apache/ws/axis/oasis/Client_deploy.wsdd
Index: Client_deploy.wsdd
===================================================================
RCS file:
/home/cvs/ws-fx/wss4j/interop/org/apache/ws/axis/oasis/Client_deploy.wsdd,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- Client_deploy.wsdd 4 Jun 2005 00:16:03 -0000 1.24
+++ Client_deploy.wsdd 4 Jun 2005 21:12:59 -0000 1.25
@@ -5,11 +5,11 @@
Usage of cert/key identifiers (parameter: user / encryptionUser):
For the interop tests we have two different certificate/key pairs:
Server certificate:
- contained in WSSTest2.pfx
- identified with:
c82f74d031dabf9d7546f40ad07c32c0_1e149434-9d3a-4adc-9284-4cfdc595012f
+ contained in bob.pfx
+ identified with: bob
Client certificate:
- contained in WSStest1.pfx
- identified with:
1fb7623be7b2f4831ffc3f3741fa09dd_1e149434-9d3a-4adc-9284-4cfdc595012f
+ contained in alice.pfx
+ identified with: alice
The Server uses it's certificate/private key to sign its request, the client
uses the server's certificate/pub key to encrypt requests
@@ -42,7 +42,7 @@
<parameter name="encryptionPropFile" value="wsstest.properties" />
<parameter name="encryptionKeyIdentifier" value="SKIKeyIdentifier" />
<!-- Use the Server's cert/key to encrypt the request -->
- <parameter name="encryptionUser"
value="c82f74d031dabf9d7546f40ad07c32c0_1e149434-9d3a-4adc-9284-4cfdc595012f" />
+ <parameter name="encryptionUser" value="bob" />
<parameter name="encryptionParts"
value="{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}UsernameToken"
/>
</handler>
@@ -59,7 +59,7 @@
<parameter name="encryptionPropFile" value="wsstest.properties" />
<parameter name="encryptionKeyIdentifier" value="SKIKeyIdentifier" />
<!-- Use the Server's cert/key to encrypt the request -->
- <parameter name="encryptionUser"
value="c82f74d031dabf9d7546f40ad07c32c0_1e149434-9d3a-4adc-9284-4cfdc595012f" />
+ <parameter name="encryptionUser" value="bob" />
<parameter name="encryptionParts"
value="{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}UsernameToken"
/>
</handler>
@@ -71,13 +71,13 @@
<handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
<parameter name="action" value="Signature Encrypt Timestamp"/>
<!-- Use the Client's cert/key to sign the request -->
- <parameter name="user"
value="1fb7623be7b2f4831ffc3f3741fa09dd_1e149434-9d3a-4adc-9284-4cfdc595012f"/>
+ <parameter name="user" value="alice"/>
<parameter name="passwordCallbackClass"
value="org.apache.ws.axis.oasis.PWCallback1"/>
<parameter name="signatureKeyIdentifier" value="DirectReference" />
<parameter name="signaturePropFile" value="wsstest.properties" />
<parameter name="encryptionKeyIdentifier" value="SKIKeyIdentifier" />
- <parameter name="encryptionUser"
value="c82f74d031dabf9d7546f40ad07c32c0_1e149434-9d3a-4adc-9284-4cfdc595012f" />
+ <parameter name="encryptionUser" value="bob" />
</handler>
</requestFlow>
<responseFlow>
@@ -95,7 +95,7 @@
<handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
<parameter name="action" value="Signature Encrypt Timestamp"/>
<!-- Use the Client's cert/key to sign the request -->
- <parameter name="user"
value="1fb7623be7b2f4831ffc3f3741fa09dd_1e149434-9d3a-4adc-9284-4cfdc595012f"/>
+ <parameter name="user" value="alice"/>
<parameter name="passwordCallbackClass"
value="org.apache.ws.axis.oasis.PWCallback1"/>
<parameter name="signatureKeyIdentifier" value="DirectReference" />
@@ -122,7 +122,7 @@
<handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
<parameter name="action" value="Signature NoSerialization"/>
<!-- Use the Client's cert/key to sign the request -->
- <parameter name="user"
value="1fb7623be7b2f4831ffc3f3741fa09dd_1e149434-9d3a-4adc-9284-4cfdc595012f"/>
+ <parameter name="user" value="alice"/>
<parameter name="passwordCallbackClass"
value="org.apache.ws.axis.oasis.PWCallback1"/>
<parameter name="signatureKeyIdentifier" value="DirectReference" />
@@ -132,7 +132,7 @@
<handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
<parameter name="action" value="Signature Timestamp"/>
<!-- Use the Client's cert/key to sign the request -->
- <parameter name="user"
value="1fb7623be7b2f4831ffc3f3741fa09dd_1e149434-9d3a-4adc-9284-4cfdc595012f"/>
+ <parameter name="user" value="alice"/>
<parameter name="passwordCallbackClass"
value="org.apache.ws.axis.oasis.PWCallback1"/>
<parameter name="signatureKeyIdentifier" value="SKIKeyIdentifier" />
@@ -146,14 +146,14 @@
<handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
<parameter name="action" value="Encrypt Signature Timestamp"/>
<!-- Use the Client's cert/key to sign the request -->
- <parameter name="user"
value="1fb7623be7b2f4831ffc3f3741fa09dd_1e149434-9d3a-4adc-9284-4cfdc595012f"/>
+ <parameter name="user" value="alice"/>
<parameter name="passwordCallbackClass"
value="org.apache.ws.axis.oasis.PWCallback1"/>
<parameter name="signatureKeyIdentifier" value="DirectReference" />
<parameter name="signaturePropFile" value="wsstest.properties" />
<parameter name="encryptionKeyIdentifier" value="SKIKeyIdentifier" />
<!-- Use the Server's cert/key to encrypt the request -->
- <parameter name="encryptionUser"
value="c82f74d031dabf9d7546f40ad07c32c0_1e149434-9d3a-4adc-9284-4cfdc595012f" />
+ <parameter name="encryptionUser" value="bob" />
</handler>
</requestFlow>
<responseFlow>
@@ -170,14 +170,14 @@
<requestFlow>
<handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
<parameter name="action" value="Signature Encrypt Timestamp"/>
- <parameter name="user"
value="1fb7623be7b2f4831ffc3f3741fa09dd_1e149434-9d3a-4adc-9284-4cfdc595012f"/>
+ <parameter name="user" value="alice"/>
<parameter name="passwordCallbackClass"
value="org.apache.ws.axis.oasis.PWCallback1"/>
<parameter name="signatureKeyIdentifier" value="DirectReference" />
<parameter name="signatureParts"
value="{}{http://schemas.xmlsoap.org/soap/envelope/}Body;STRTransform"
/>
<parameter name="signaturePropFile" value="wsstest.properties" />
<parameter name="encryptionKeyIdentifier" value="SKIKeyIdentifier" />
- <parameter name="encryptionUser"
value="c82f74d031dabf9d7546f40ad07c32c0_1e149434-9d3a-4adc-9284-4cfdc595012f" />
+ <parameter name="encryptionUser" value="bob" />
<parameter name="encryptionPropFile" value="wsstest.properties" />
</handler>
</requestFlow>
1.6 +214 -107
ws-fx/wss4j/interop/org/apache/ws/axis/oasis/PWCallback1.java
Index: PWCallback1.java
===================================================================
RCS file:
/home/cvs/ws-fx/wss4j/interop/org/apache/ws/axis/oasis/PWCallback1.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- PWCallback1.java 6 May 2005 15:31:22 -0000 1.5
+++ PWCallback1.java 4 Jun 2005 21:12:59 -0000 1.6
@@ -1,107 +1,214 @@
-/*
- * 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.
- *
- */
-
-/**
- * @author Werner Dittmann ([EMAIL PROTECTED])
- */
-package org.apache.ws.axis.oasis;
-
-import org.apache.ws.security.WSPasswordCallback;
-
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.UnsupportedCallbackException;
-import java.io.IOException;
-
-/**
- * Class PWCallback
- */
-public class PWCallback1 implements CallbackHandler {
-
- /** Field key */
- private static final byte[] key = {
- (byte) 0x31, (byte) 0xfd, (byte) 0xcb, (byte) 0xda, (byte) 0xfb,
- (byte) 0xcd, (byte) 0x6b, (byte) 0xa8, (byte) 0xe6, (byte) 0x19,
- (byte) 0xa7, (byte) 0xbf, (byte) 0x51, (byte) 0xf7, (byte) 0xc7,
- (byte) 0x3e, (byte) 0x80, (byte) 0xae, (byte) 0x98, (byte) 0x51,
- (byte) 0xc8, (byte) 0x51, (byte) 0x34, (byte) 0x04,
- };
-
- /*
- * (non-Javadoc)
- * @see
javax.security.auth.callback.CallbackHandler#handle(javax.security.auth.callback.Callback[])
- */
-
- /**
- * Method handle
- *
- * @param callbacks
- * @throws java.io.IOException
- * @throws javax.security.auth.callback.UnsupportedCallbackException
- */
- public void handle(Callback[] callbacks)
- throws IOException, UnsupportedCallbackException {
-
- for (int i = 0; i < callbacks.length; i++) {
- if (callbacks[i] instanceof WSPasswordCallback) {
- WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
-
- /*
- * This usage type is used only in case we received a
- * username token with a password of type PasswordText or
- * an unknown password type.
- *
- * This case the WSPasswordCallback object contains the
- * identifier (aka username), the password we received, and
- * the password type string to identify the type.
- *
- * Here we perform only a very simple check.
- */
- if (pc.getUsage() ==
WSPasswordCallback.USERNAME_TOKEN_UNKNOWN) {
- if(pc.getIdentifer().equals("Ron") &&
pc.getPassword().equals("noR")) {
- return;
- }
- if (pc.getPassword().equals("sirhC")) {
- return;
- }
- throw new UnsupportedCallbackException(callbacks[i],
- "check failed");
- }
- /*
- * here call a function/method to lookup the password for
- * the given identifier (e.g. a user name or keystore alias)
- * e.g.:
pc.setPassword(passStore.getPassword(pc.getIdentfifier))
- * for Testing we supply a fixed name here.
- */
- if (pc.getUsage() == WSPasswordCallback.KEY_NAME) {
- pc.setKey(key);
- } else
if(pc.getIdentifer().equals("1fb7623be7b2f4831ffc3f3741fa09dd_1e149434-9d3a-4adc-9284-4cfdc595012f"))
{
- pc.setPassword("interop");
- } else
if(pc.getIdentifer().equals("c82f74d031dabf9d7546f40ad07c32c0_1e149434-9d3a-4adc-9284-4cfdc595012f"))
{
- pc.setPassword("interop");
- } else if(pc.getIdentifer().equals("Ron")) {
- pc.setPassword("noR");
- } else {
- pc.setPassword("sirhC");
- }
- } else {
- throw new UnsupportedCallbackException(callbacks[i],
- "Unrecognized Callback");
- }
- }
- }
-}
+/*
+
+ * 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.
+
+ *
+
+ */
+
+
+
+/**
+
+ * @author Werner Dittmann ([EMAIL PROTECTED])
+
+ */
+
+package org.apache.ws.axis.oasis;
+
+
+
+import org.apache.ws.security.WSPasswordCallback;
+
+
+
+import javax.security.auth.callback.Callback;
+
+import javax.security.auth.callback.CallbackHandler;
+
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import java.io.IOException;
+
+
+
+/**
+
+ * Class PWCallback
+
+ */
+
+public class PWCallback1 implements CallbackHandler {
+
+
+
+ /** Field key */
+
+ private static final byte[] key = {
+
+ (byte) 0x31, (byte) 0xfd, (byte) 0xcb, (byte) 0xda, (byte) 0xfb,
+
+ (byte) 0xcd, (byte) 0x6b, (byte) 0xa8, (byte) 0xe6, (byte) 0x19,
+
+ (byte) 0xa7, (byte) 0xbf, (byte) 0x51, (byte) 0xf7, (byte) 0xc7,
+
+ (byte) 0x3e, (byte) 0x80, (byte) 0xae, (byte) 0x98, (byte) 0x51,
+
+ (byte) 0xc8, (byte) 0x51, (byte) 0x34, (byte) 0x04,
+
+ };
+
+
+
+ /*
+
+ * (non-Javadoc)
+
+ * @see
javax.security.auth.callback.CallbackHandler#handle(javax.security.auth.callback.Callback[])
+
+ */
+
+
+
+ /**
+
+ * Method handle
+
+ *
+
+ * @param callbacks
+
+ * @throws java.io.IOException
+
+ * @throws javax.security.auth.callback.UnsupportedCallbackException
+
+ */
+
+ public void handle(Callback[] callbacks)
+
+ throws IOException, UnsupportedCallbackException {
+
+
+
+ for (int i = 0; i < callbacks.length; i++) {
+
+ if (callbacks[i] instanceof WSPasswordCallback) {
+
+ WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
+
+
+
+ /*
+
+ * This usage type is used only in case we received a
+
+ * username token with a password of type PasswordText or
+
+ * an unknown password type.
+
+ *
+
+ * This case the WSPasswordCallback object contains the
+
+ * identifier (aka username), the password we received, and
+
+ * the password type string to identify the type.
+
+ *
+
+ * Here we perform only a very simple check.
+
+ */
+
+ if (pc.getUsage() ==
WSPasswordCallback.USERNAME_TOKEN_UNKNOWN) {
+
+ if(pc.getIdentifer().equals("Ron") &&
pc.getPassword().equals("noR")) {
+
+ return;
+
+ }
+
+ if (pc.getPassword().equals("sirhC")) {
+
+ return;
+
+ }
+
+ throw new UnsupportedCallbackException(callbacks[i],
+
+ "check failed");
+
+ }
+
+ /*
+
+ * here call a function/method to lookup the password for
+
+ * the given identifier (e.g. a user name or keystore alias)
+
+ * e.g.:
pc.setPassword(passStore.getPassword(pc.getIdentfifier))
+
+ * for Testing we supply a fixed name here.
+
+ */
+
+ if (pc.getUsage() == WSPasswordCallback.KEY_NAME) {
+
+ pc.setKey(key);
+
+ } else if(pc.getIdentifer().equals("alice")) {
+
+ pc.setPassword("password");
+
+ } else if(pc.getIdentifer().equals("bob")) {
+
+ pc.setPassword("password");
+
+ } else if(pc.getIdentifer().equals("Ron")) {
+
+ pc.setPassword("noR");
+
+ } else {
+
+ pc.setPassword("sirhC");
+
+ }
+
+ } else {
+
+ throw new UnsupportedCallbackException(callbacks[i],
+
+ "Unrecognized Callback");
+
+ }
+
+ }
+
+ }
+
+}
+
1.23 +7 -7
ws-fx/wss4j/interop/org/apache/ws/axis/oasis/ping/deploy.wsdd
Index: deploy.wsdd
===================================================================
RCS file:
/home/cvs/ws-fx/wss4j/interop/org/apache/ws/axis/oasis/ping/deploy.wsdd,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- deploy.wsdd 24 Oct 2004 12:42:50 -0000 1.22
+++ deploy.wsdd 4 Jun 2005 21:12:59 -0000 1.23
@@ -129,14 +129,14 @@
<handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
<parameter name="action" value="Signature Encrypt Timestamp"/>
<!-- Use the Server's cert/key to sign the response -->
- <parameter name="user"
value="c82f74d031dabf9d7546f40ad07c32c0_1e149434-9d3a-4adc-9284-4cfdc595012f"/>
+ <parameter name="user" value="bob"/>
<parameter name="passwordCallbackClass"
value="org.apache.ws.axis.oasis.PWCallback1"/>
<parameter name="signatureKeyIdentifier" value="DirectReference" />
<parameter name="signaturePropFile" value="wsstest.properties" />
<parameter name="encryptionKeyIdentifier" value="SKIKeyIdentifier" />
<!-- Use the Client's cert/key to encrypt the response -->
- <parameter name="encryptionUser"
value="1fb7623be7b2f4831ffc3f3741fa09dd_1e149434-9d3a-4adc-9284-4cfdc595012f" />
+ <parameter name="encryptionUser" value="alice" />
</handler>
</responseFlow>
</service>
@@ -172,7 +172,7 @@
<handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
<parameter name="action" value="Signature Encrypt Timestamp"/>
<!-- Use the Server's cert/key to sign the response -->
- <parameter name="user"
value="c82f74d031dabf9d7546f40ad07c32c0_1e149434-9d3a-4adc-9284-4cfdc595012f"/>
+ <parameter name="user" value="bob"/>
<parameter name="passwordCallbackClass"
value="org.apache.ws.axis.oasis.PWCallback1"/>
<parameter name="signatureKeyIdentifier" value="SKIKeyIdentifier" />
@@ -245,14 +245,14 @@
<handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
<parameter name="action" value="Encrypt Signature Timestamp"/>
<!-- Use the Server's cert/key to sign the response -->
- <parameter name="user"
value="c82f74d031dabf9d7546f40ad07c32c0_1e149434-9d3a-4adc-9284-4cfdc595012f"/>
+ <parameter name="user" value="bob"/>
<parameter name="passwordCallbackClass"
value="org.apache.ws.axis.oasis.PWCallback1"/>
<parameter name="signatureKeyIdentifier" value="SKIKeyIdentifier" />
<parameter name="signaturePropFile" value="wsstest.properties" />
<parameter name="encryptionKeyIdentifier" value="DirectReference" />
<!-- Use the Client's cert/key to encrypt the response -->
- <parameter name="encryptionUser"
value="1fb7623be7b2f4831ffc3f3741fa09dd_1e149434-9d3a-4adc-9284-4cfdc595012f" />
+ <parameter name="encryptionUser" value="alice" />
</handler>
</responseFlow>
</service>
@@ -290,7 +290,7 @@
<handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
<parameter name="action" value="Signature Encrypt Timestamp"/>
<!-- Use the Server's cert/key to sign the response -->
- <parameter name="user"
value="c82f74d031dabf9d7546f40ad07c32c0_1e149434-9d3a-4adc-9284-4cfdc595012f"/>
+ <parameter name="user" value="bob"/>
<parameter name="passwordCallbackClass"
value="org.apache.ws.axis.oasis.PWCallback1"/>
<parameter name="signatureKeyIdentifier" value="SKIKeyIdentifier" />
@@ -298,7 +298,7 @@
<parameter name="encryptionPropFile" value="wsstest.properties" />
<parameter name="encryptionKeyIdentifier" value="DirectReference" />
<!-- Use the Client's cert/key to encrypt the response -->
- <parameter name="encryptionUser"
value="1fb7623be7b2f4831ffc3f3741fa09dd_1e149434-9d3a-4adc-9284-4cfdc595012f" />
+ <parameter name="encryptionUser" value="alice" />
</handler>
</responseFlow>
1.2 +9 -5 ws-fx/wss4j/interop/interop2.jks
<<Binary file>>
1.2 +2 -2 ws-fx/wss4j/interop/wsstest.properties
Index: wsstest.properties
===================================================================
RCS file: /home/cvs/ws-fx/wss4j/interop/wsstest.properties,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- wsstest.properties 17 Mar 2004 17:34:29 -0000 1.1
+++ wsstest.properties 4 Jun 2005 21:12:59 -0000 1.2
@@ -1,5 +1,5 @@
org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
org.apache.ws.security.crypto.merlin.keystore.type=jks
-org.apache.ws.security.crypto.merlin.keystore.password=interop
-org.apache.ws.security.crypto.merlin.file=interop/interop.jks
+org.apache.ws.security.crypto.merlin.keystore.password=password
+org.apache.ws.security.crypto.merlin.file=interop/interop2.jks
1.2 +4 -4
ws-fx/wss4j/src/org/apache/ws/axis/security/trust/secconv/interop/PWCallBackHandler.java
Index: PWCallBackHandler.java
===================================================================
RCS file:
/home/cvs/ws-fx/wss4j/src/org/apache/ws/axis/security/trust/secconv/interop/PWCallBackHandler.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- PWCallBackHandler.java 16 Oct 2004 08:07:10 -0000 1.1
+++ PWCallBackHandler.java 4 Jun 2005 21:12:59 -0000 1.2
@@ -44,10 +44,10 @@
//for whatever username set the
password as rabbit
if(pc.getIdentifer().equals("Alice")){
pc.setPassword("ecilA");
- } else
if(pc.getIdentifer().equals("1fb7623be7b2f4831ffc3f3741fa09dd_1e149434-9d3a-4adc-9284-4cfdc595012f"))
{
- pc.setPassword("interop");
- } else
if(pc.getIdentifer().equals("c82f74d031dabf9d7546f40ad07c32c0_1e149434-9d3a-4adc-9284-4cfdc595012f"))
{
- pc.setPassword("interop");
+ } else
if(pc.getIdentifer().equals("alice")) {
+ pc.setPassword("password");
+ } else
if(pc.getIdentifer().equals("bob")) {
+ pc.setPassword("password");
}
}
}
1.2 +12 -8 ws-fx/wss4j/interop/keys/README.txt
Index: README.txt
===================================================================
RCS file: /home/cvs/ws-fx/wss4j/interop/keys/README.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- README.txt 4 Jun 2005 02:42:37 -0000 1.1
+++ README.txt 4 Jun 2005 21:12:59 -0000 1.2
@@ -7,19 +7,23 @@
certificate.
- Conversion tips are from http://mark.foster.cc/kb/openssl-keytool.html
-java -classpath org.mortbay.jetty-5.1.4rc0.jar org.mortbay.util.PKCS12Import
alice.pfx alice.jks
-java -classpath org.mortbay.jetty-5.1.4rc0.jar org.mortbay.util.PKCS12Import
bob.pfx bob.jks
-java -classpath org.mortbay.jetty-5.1.4rc0.jar org.mortbay.util.PKCS12Import
ca.pfx ca.jks
-java -classpath org.mortbay.jetty-5.1.4rc0.jar org.mortbay.util.PKCS12Import
root.pfx root.jks
+set CLASSPATH=org.mortbay.jetty-5.1.4rc0.jar;
+
+java org.mortbay.util.PKCS12Import alice.pfx interop2.jks
+keytool -keyclone -keystore interop2.jks -alias 1 -dest alice
+keytool -delete -keystore interop2.jks -alias 1
+
+java org.mortbay.util.PKCS12Import bob.pfx interop2.jks
+keytool -keyclone -keystore interop2.jks -alias 1 -dest bob
+keytool -delete -keystore interop2.jks -alias 1
+
+java org.mortbay.util.PKCS12Import ca.pfx ca.jks
+java org.mortbay.util.PKCS12Import root.pfx root.jks
keytool -export -alias 1 -keystore root.jks -file root.crt
-keytool -export -alias 1 -keystore bob.jks -file bob.crt
-keytool -export -alias 1 -keystore alice.jks -file alice.crt
keytool -export -alias 1 -keystore ca.jks -file ca.crt
keytool -import -keystore interop2.jks -import -trustcacerts -alias root
-file root.crt
keytool -import -keystore interop2.jks -import -trustcacerts -alias ca -file
ca.crt
-keytool -import -keystore interop2.jks -import -trustcacerts -alias bob
-file bob.crt
-keytool -import -keystore interop2.jks -import -trustcacerts -alias alice
-file alice.crt
keytool -list -v -keystore interop2.jks
\ No newline at end of file
1.4 +4 -4 ws-fx/wss4j/test/interop/TestInteropKeys.java
Index: TestInteropKeys.java
===================================================================
RCS file: /home/cvs/ws-fx/wss4j/test/interop/TestInteropKeys.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- TestInteropKeys.java 10 Jun 2004 11:37:43 -0000 1.3
+++ TestInteropKeys.java 4 Jun 2005 21:12:59 -0000 1.4
@@ -39,19 +39,19 @@
public void testInteropKeys1() throws Exception {
Crypto c = CryptoFactory.getInstance("wsstest.properties");
- X509Certificate[] certs =
c.getCertificates("1fb7623be7b2f4831ffc3f3741fa09dd_1e149434-9d3a-4adc-9284-4cfdc595012f");
+ X509Certificate[] certs = c.getCertificates("alice");
assertTrue(certs != null);
assertTrue(certs[0] != null);
- PrivateKey privKey =
c.getPrivateKey("1fb7623be7b2f4831ffc3f3741fa09dd_1e149434-9d3a-4adc-9284-4cfdc595012f","interop");
+ PrivateKey privKey = c.getPrivateKey("alice","password");
assertTrue(privKey != null);
}
public void testInteropKeys2() throws Exception {
Crypto c = CryptoFactory.getInstance("wsstest.properties");
- X509Certificate[] certs =
c.getCertificates("c82f74d031dabf9d7546f40ad07c32c0_1e149434-9d3a-4adc-9284-4cfdc595012f");
+ X509Certificate[] certs = c.getCertificates("bob");
assertTrue(certs != null);
assertTrue(certs[0] != null);
- PrivateKey privKey =
c.getPrivateKey("c82f74d031dabf9d7546f40ad07c32c0_1e149434-9d3a-4adc-9284-4cfdc595012f","interop");
+ PrivateKey privKey = c.getPrivateKey("bob","password");
assertTrue(privKey != null);
}
}
1.2 +2 -2 ws-fx/wss4j/test/interop/TestJAXRPCHandler.java
Index: TestJAXRPCHandler.java
===================================================================
RCS file: /home/cvs/ws-fx/wss4j/test/interop/TestJAXRPCHandler.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TestJAXRPCHandler.java 12 Aug 2004 17:42:10 -0000 1.1
+++ TestJAXRPCHandler.java 4 Jun 2005 21:12:59 -0000 1.2
@@ -52,12 +52,12 @@
Map config = new HashMap();
config.put("deployment", "client");
config.put("action", "Signature Encrypt Timestamp");
- config.put("user",
"1fb7623be7b2f4831ffc3f3741fa09dd_1e149434-9d3a-4adc-9284-4cfdc595012f");
+ config.put("user", "alice");
config.put("passwordCallbackClass",
"org.apache.ws.axis.oasis.PWCallback1");
config.put("signatureKeyIdentifier", "DirectReference");
config.put("signaturePropFile", "wsstest.properties");
config.put("encryptionKeyIdentifier", "SKIKeyIdentifier");
- config.put("encryptionUser",
"c82f74d031dabf9d7546f40ad07c32c0_1e149434-9d3a-4adc-9284-4cfdc595012f");
+ config.put("encryptionUser", "bob");
handlerChain.add(new HandlerInfo(WSS4JHandler.class, config, null));
HandlerRegistry registry = service.getHandlerRegistry();