You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-dev@ws.apache.org by ka...@apache.org on 2007/05/29 14:12:59 UTC

svn commit: r542497 - in /webservices/rampart/trunk/c: samples/client/sec_echo/echo.c samples/client/sec_echo/echo_helper.c samples/secpolicy/README.txt samples/secpolicy/deploy.sh src/util/rampart_engine.c

Author: kaushalye
Date: Tue May 29 05:12:58 2007
New Revision: 542497

URL: http://svn.apache.org/viewvc?view=rev&rev=542497
Log:
Changes in samples and README file

Modified:
    webservices/rampart/trunk/c/samples/client/sec_echo/echo.c
    webservices/rampart/trunk/c/samples/client/sec_echo/echo_helper.c
    webservices/rampart/trunk/c/samples/secpolicy/README.txt
    webservices/rampart/trunk/c/samples/secpolicy/deploy.sh
    webservices/rampart/trunk/c/src/util/rampart_engine.c

Modified: webservices/rampart/trunk/c/samples/client/sec_echo/echo.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/client/sec_echo/echo.c?view=diff&rev=542497&r1=542496&r2=542497
==============================================================================
--- webservices/rampart/trunk/c/samples/client/sec_echo/echo.c (original)
+++ webservices/rampart/trunk/c/samples/client/sec_echo/echo.c Tue May 29 05:12:58 2007
@@ -115,7 +115,7 @@
 
     if(status == AXIS2_FAILURE)
     {
-        printf("policy setting failed\n");
+        printf("Policy setting failed\n");
         return 0;
     }
 

Modified: webservices/rampart/trunk/c/samples/client/sec_echo/echo_helper.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/client/sec_echo/echo_helper.c?view=diff&rev=542497&r1=542496&r2=542497
==============================================================================
--- webservices/rampart/trunk/c/samples/client/sec_echo/echo_helper.c (original)
+++ webservices/rampart/trunk/c/samples/client/sec_echo/echo_helper.c Tue May 29 05:12:58 2007
@@ -28,10 +28,10 @@
     if(client_home)
     {
         file_name = axutil_stracat(env, client_home, "policy.xml" );
-            
     }
-    else
+    else{
         return AXIS2_FAILURE;
+    }
 
     reader = axiom_xml_reader_create_for_file(env, file_name, NULL);
 
@@ -39,7 +39,7 @@
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_CREATING_XML_STREAM_READER,
                 AXIS2_FAILURE);
-        printf("xml reader creation failed\n");
+        printf("xml reader creation failed for policy file %s\n", file_name);
         return AXIS2_FAILURE;
     }
     

Modified: webservices/rampart/trunk/c/samples/secpolicy/README.txt
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/secpolicy/README.txt?view=diff&rev=542497&r1=542496&r2=542497
==============================================================================
--- webservices/rampart/trunk/c/samples/secpolicy/README.txt (original)
+++ webservices/rampart/trunk/c/samples/secpolicy/README.txt Tue May 29 05:12:58 2007
@@ -15,14 +15,9 @@
 -------------------
 1.          Timestamp
 2.          UsernameToken
-3.          Client Encrypt(DirectReference)        
-4.          Client Encrypt(IssuerSerial/RefKeyIdentifier/Embedded)           
-5.          Client Sign(DirectReference)        
-6.          Client Sign(IssuerSerial/RefKeyIdentifier/Embedded)           
-7.          Timestamp, UsernameToken, Encrypt, Sign (Encrypt before sign/ Sign
-before encrypt)
-8.          A complete scenario, where both client and server encrypt/sign,
-add Timestamps, Usernametokens.
+3.          Encryption        
+4.          Signature           
+5.          A complete scenario to show :Timestamp, UsernameToken, Encrypt, Sign 
 
 FAQ:
 ---
@@ -45,15 +40,6 @@
 http://ws.apache.org/commons/tcpmon/
 Make sure that you give the correct port that you configured in TCPMon
 while running the scripts
-
-* I cannot run samples and the log says "[rampart][rampart_Engine] Cannot get policy"
-----------------------------------------------------------
-Check your descriptor file where you engaged rampart(i.e. services.xml or
-axis2.xml)
-Make sure that you have correct values for 
-    <parameter name="OutflowSecurityPolicy"></parameter>
-    and
-    <parameter name="InflowSecurityPolicy"></parameter>
 
 * I cannot run samples and log says keys cannot be loaded
 --------------------------------------------------------

Modified: webservices/rampart/trunk/c/samples/secpolicy/deploy.sh
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/secpolicy/deploy.sh?view=diff&rev=542497&r1=542496&r2=542497
==============================================================================
--- webservices/rampart/trunk/c/samples/secpolicy/deploy.sh (original)
+++ webservices/rampart/trunk/c/samples/secpolicy/deploy.sh Tue May 29 05:12:58 2007
@@ -14,13 +14,13 @@
 echo "Copying client policy files to $CLIENT_REPO"
 cp $1/client-policy.xml $CLIENT_REPO/policy.xml
 
-echo "replacing username in policy files."
+echo "Replacing settings in policy files."
 sed -i 's,AXIS2C_HOME,'$AXIS2C_HOME',g' $CLIENT_REPO/policy.xml
 
 #copy services.xml to SERVICE_HOME
 echo "Copying services.xml to $SERVICE_HOME"
 cp $1/services.xml $SERVICE_HOME/services.xml
 
-echo "replacing username in Configuration files."
+echo "Replacing settings in Configuration files."
 sed -i 's,AXIS2C_HOME,'$AXIS2C_HOME',g' $SERVICE_HOME/services.xml
 

Modified: webservices/rampart/trunk/c/src/util/rampart_engine.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/util/rampart_engine.c?view=diff&rev=542497&r1=542496&r2=542497
==============================================================================
--- webservices/rampart/trunk/c/src/util/rampart_engine.c (original)
+++ webservices/rampart/trunk/c/src/util/rampart_engine.c Tue May 29 05:12:58 2007
@@ -30,6 +30,7 @@
 #include <rampart_util.h>
 #include <rampart_constants.h>
 #include <rampart_callback.h>
+#include <rampart_replay_detector.h>
 #include <axis2_msg.h>
 #include <axis2_conf_ctx.h>
 
@@ -181,8 +182,12 @@
         property = axutil_property_create_with_args(env, AXIS2_SCOPE_APPLICATION,
                                             AXIS2_FALSE, (void *)rampart_context_free, rampart_context);
         axis2_ctx_set_property(ctx, env, RAMPART_CONTEXT, property);
+    }else{ /*Server side only*/
+         /*We set our default impl of replay detection function*/
+        if(is_inflow){
+            rampart_context_set_replay_detect_function(rampart_context, env, rampart_replay_detector_default);
+        }
     }
-    
     return rampart_context;
 }