Author: dumindu
Date: Tue Dec 11 01:39:37 2007
New Revision: 10922

Log:

fixed managed card processing



Modified:
   
branches/solutions/identity/1.0/solutions/identity/modules/mod-cspace/cspace_config.c
   
branches/solutions/identity/1.0/solutions/identity/modules/mod-cspace/mod_cspace.c
   
branches/solutions/identity/1.0/solutions/identity/modules/mod-cspace/process_request.c

Modified: 
branches/solutions/identity/1.0/solutions/identity/modules/mod-cspace/cspace_config.c
==============================================================================
--- 
branches/solutions/identity/1.0/solutions/identity/modules/mod-cspace/cspace_config.c
       (original)
+++ 
branches/solutions/identity/1.0/solutions/identity/modules/mod-cspace/cspace_config.c
       Tue Dec 11 01:39:37 2007
@@ -195,6 +195,7 @@
     cfg->key_file = NULL;
     cfg->session_file = NULL;
     cfg->session_expire = -1;
+    cfg->ca_file = NULL;
     /*cfg->session_ctx = session_ctx_create(p, NULL, &(cfg->session_expire));*/
 #ifdef CSPACE_DEBUG
     cfg_svr_printf("CREATED svr cfg:\t", cfg, "\n\n");
@@ -218,6 +219,10 @@
     /*would a shallow copy be fine?*/
     merged_cfg->key_file = temp_char;
     temp_char = NULL;
+   
+    temp_char = (ocfg->ca_file) ? ocfg->ca_file : pcfg->ca_file;
+    merged_cfg->ca_file = temp_char;
+    temp_char = NULL;
     
     temp_char = (ocfg->session_file) ? ocfg->session_file : pcfg->session_file;
     /*would a shallow copy be fine?*/

Modified: 
branches/solutions/identity/1.0/solutions/identity/modules/mod-cspace/mod_cspace.c
==============================================================================
--- 
branches/solutions/identity/1.0/solutions/identity/modules/mod-cspace/mod_cspace.c
  (original)
+++ 
branches/solutions/identity/1.0/solutions/identity/modules/mod-cspace/mod_cspace.c
  Tue Dec 11 01:39:37 2007
@@ -398,8 +398,8 @@
 
     cspace_process_context_set_key_file(ctx, svr_cfg->key_file);
     
-    /*if (ctx->ca_file)
-        cspace_process_context_set_ca_file(ctx, svr_cfg->ca_file);*/
+    if (svr_cfg->ca_file)
+        cspace_process_context_set_ca_file(ctx, svr_cfg->ca_file);
 
     cspace_process_context_set_logger(ctx, cspace_log_error, r->server);
 

Modified: 
branches/solutions/identity/1.0/solutions/identity/modules/mod-cspace/process_request.c
==============================================================================
--- 
branches/solutions/identity/1.0/solutions/identity/modules/mod-cspace/process_request.c
     (original)
+++ 
branches/solutions/identity/1.0/solutions/identity/modules/mod-cspace/process_request.c
     Tue Dec 11 01:39:37 2007
@@ -89,12 +89,6 @@
         goto done;
     }
     
-    /* verify signature */
-    if (!verify_signature(doc, ctx)) {
-        /*log*/
-        goto done;
-    }
-
     if (!ctx->set_header_fn) {
         /*log*/
         goto done;
@@ -104,6 +98,12 @@
         goto done;
     }
 
+    /* verify signature */
+    if (!verify_signature(doc, ctx)) {
+        /*log*/
+        goto done;
+    }
+
     res = SUCC;
 
 done:
@@ -140,7 +140,6 @@
 void cspace_process_context_set_header_callback_context(process_context_t *ctx,
                                                         void *cb_ctx)
 {
-    pc_log_error(ctx, "TEST_ERROR TEST_ERROR", PCLOG_ERR);
     ctx->set_header_cb_ctx = cb_ctx;
 }
 

_______________________________________________
Identity-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/identity-dev

Reply via email to