You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2012/12/08 16:49:42 UTC
svn commit: r1418693 - in
/cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security:
sign_enc/src/main/java/demo/wssec/client/
sign_enc/src/main/java/demo/wssec/server/
ut_sign/src/main/java/demo/wssec/client/ ut_sign/src/main/java/de...
Author: coheigea
Date: Sat Dec 8 15:49:41 2012
New Revision: 1418693
URL: http://svn.apache.org/viewvc?rev=1418693&view=rev
Log:
Merged revisions 1418688 via git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1418688 | coheigea | 2012-12-08 15:33:53 +0000 (Sat, 08 Dec 2012) | 2 lines
Specifying encryption + signature algorithms in the demos
........
Modified:
cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/sign_enc/src/main/java/demo/wssec/client/Client.java
cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/sign_enc/src/main/java/demo/wssec/server/Server.java
cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_sign/src/main/java/demo/wssec/client/Client.java
cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_sign/src/main/java/demo/wssec/server/Server.java
Modified: cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/sign_enc/src/main/java/demo/wssec/client/Client.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/sign_enc/src/main/java/demo/wssec/client/Client.java?rev=1418693&r1=1418692&r2=1418693&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/sign_enc/src/main/java/demo/wssec/client/Client.java (original)
+++ cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/sign_enc/src/main/java/demo/wssec/client/Client.java Sat Dec 8 15:49:41 2012
@@ -77,6 +77,10 @@ public final class Client {
+ "{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body;"
+ "{}{http://www.w3.org/2005/08/addressing}ReplyTo;");
+ outProps.put("encryptionKeyTransportAlgorithm",
+ "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p");
+ outProps.put("signatureAlgorithm", "http://www.w3.org/2000/09/xmldsig#rsa-sha1");
+
bus.getOutInterceptors().add(new WSS4JOutInterceptor(outProps));
Map<String, Object> inProps = new HashMap<String, Object>();
@@ -91,6 +95,10 @@ public final class Client {
inProps.put("signaturePropFile", "etc/Client_Encrypt.properties");
inProps.put("signatureKeyIdentifier", "DirectReference");
+ inProps.put("encryptionKeyTransportAlgorithm",
+ "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p");
+ inProps.put("signatureAlgorithm", "http://www.w3.org/2000/09/xmldsig#rsa-sha1");
+
bus.getInInterceptors().add(new WSS4JInInterceptor(inProps));
// Check to make sure that the SOAP Body and Timestamp were signed,
Modified: cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/sign_enc/src/main/java/demo/wssec/server/Server.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/sign_enc/src/main/java/demo/wssec/server/Server.java?rev=1418693&r1=1418692&r2=1418693&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/sign_enc/src/main/java/demo/wssec/server/Server.java (original)
+++ cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/sign_enc/src/main/java/demo/wssec/server/Server.java Sat Dec 8 15:49:41 2012
@@ -73,6 +73,10 @@ public class Server {
outProps.put("signatureParts", "{Element}{" + WSU_NS + "}Timestamp;"
+ "{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body");
+ outProps.put("encryptionKeyTransportAlgorithm",
+ "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p");
+ outProps.put("signatureAlgorithm", "http://www.w3.org/2000/09/xmldsig#rsa-sha1");
+
bus.getOutInterceptors().add(new WSS4JOutInterceptor(outProps));
Map<String, Object> inProps = new HashMap<String, Object>();
@@ -86,6 +90,9 @@ public class Server {
inProps.put("signaturePropFile", "etc/Server_SignVerf.properties");
inProps.put("signatureKeyIdentifier", "DirectReference");
+ inProps.put("encryptionKeyTransportAlgorithm",
+ "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p");
+ inProps.put("signatureAlgorithm", "http://www.w3.org/2000/09/xmldsig#rsa-sha1");
bus.getInInterceptors().add(new WSS4JInInterceptor(inProps));
Modified: cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_sign/src/main/java/demo/wssec/client/Client.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_sign/src/main/java/demo/wssec/client/Client.java?rev=1418693&r1=1418692&r2=1418693&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_sign/src/main/java/demo/wssec/client/Client.java (original)
+++ cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_sign/src/main/java/demo/wssec/client/Client.java Sat Dec 8 15:49:41 2012
@@ -66,6 +66,7 @@ public final class Client {
"{Element}{" + WSU_NS + "}Timestamp;"
+ "{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body;"
+ "{}{http://www.w3.org/2005/08/addressing}ReplyTo;");
+ outProps.put("signatureAlgorithm", "http://www.w3.org/2000/09/xmldsig#rsa-sha1");
bus.getOutInterceptors().add(new WSS4JOutInterceptor(outProps));
@@ -77,6 +78,7 @@ public final class Client {
inProps.put("signaturePropFile", "etc/Client_Encrypt.properties");
inProps.put("signatureKeyIdentifier", "DirectReference");
+ inProps.put("signatureAlgorithm", "http://www.w3.org/2000/09/xmldsig#rsa-sha1");
bus.getInInterceptors().add(new WSS4JInInterceptor(inProps));
Modified: cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_sign/src/main/java/demo/wssec/server/Server.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_sign/src/main/java/demo/wssec/server/Server.java?rev=1418693&r1=1418692&r2=1418693&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_sign/src/main/java/demo/wssec/server/Server.java (original)
+++ cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_sign/src/main/java/demo/wssec/server/Server.java Sat Dec 8 15:49:41 2012
@@ -65,6 +65,7 @@ public class Server {
outProps.put("signatureKeyIdentifier", "DirectReference");
outProps.put("signatureParts", "{Element}{" + WSU_NS + "}Timestamp;"
+ "{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body");
+ outProps.put("signatureAlgorithm", "http://www.w3.org/2000/09/xmldsig#rsa-sha1");
bus.getOutInterceptors().add(new WSS4JOutInterceptor(outProps));
@@ -76,6 +77,7 @@ public class Server {
inProps.put("signaturePropFile", "etc/Server_SignVerf.properties");
inProps.put("signatureKeyIdentifier", "DirectReference");
+ inProps.put("signatureAlgorithm", "http://www.w3.org/2000/09/xmldsig#rsa-sha1");
bus.getInInterceptors().add(new WSS4JInInterceptor(inProps));