[wso2-wsf-cpp/f18] - Added rampartc-timestamp.patch - Added rampartc-c14n-new.patch
Peter MacKinnon
pmackinn at fedoraproject.org
Fri Aug 24 21:42:28 UTC 2012
commit f79c98cf11d7773fbce153cb53cb16e1180f80a2
Author: Peter MacKinnon <pmackinn at redhat.com>
Date: Fri Aug 24 17:41:09 2012 -0400
- Added rampartc-timestamp.patch
- Added rampartc-c14n-new.patch
rampartc-c14n-new.patch | 67 ++++++++++++++++++++++++++++++++++++++++++++++
rampartc-timestamp.patch | 12 ++++++++
wso2-wsf-cpp.spec | 13 +++++++--
3 files changed, 89 insertions(+), 3 deletions(-)
---
diff --git a/rampartc-c14n-new.patch b/rampartc-c14n-new.patch
new file mode 100644
index 0000000..3647525
--- /dev/null
+++ b/rampartc-c14n-new.patch
@@ -0,0 +1,67 @@
+--- wso2-wsf-cpp-src-2.1.0/wsf_c/rampartc/src/omxmlsec/c14n/c14n.c 2012-08-21 16:59:45.351092451 -0400
++++ wso2-wsf-cpp-src-2.1.0.new/wsf_c/rampartc/src/omxmlsec/c14n/c14n.c 2012-08-21 16:56:03.135112332 -0400
+@@ -26,6 +26,7 @@
+ #include <axutil_array_list.h>
+ #include <axiom_element.h>
+ #include <axiom_children_iterator.h>
++#include <axiom_data_source.h>
+ #include <axiom_document.h>
+ #include <axiom_comment.h>
+ #include <oxs_constants.h>
+@@ -466,6 +467,11 @@
+ const c14n_ctx_t *ctx);
+
+ static axis2_status_t
++c14n_apply_on_data_source (
++ const axiom_node_t *node,
++ const c14n_ctx_t *ctx);
++
++static axis2_status_t
+ c14n_apply_on_node(
+ axiom_node_t *node,
+ c14n_ctx_t *ctx);
+@@ -786,6 +792,9 @@
+ c14n_apply_on_comment(node, ctx->outbuffer, ctx->env);
+ break;
+ }
++ case AXIOM_DATA_SOURCE:
++ c14n_apply_on_data_source(node, ctx);
++ break;
+ case AXIOM_DOCTYPE:
+ case AXIOM_PROCESSING_INSTRUCTION:
+ default:
+@@ -904,6 +913,34 @@
+ return res;
+ }
+
++static axis2_status_t
++c14n_apply_on_data_source (
++ const axiom_node_t *node,
++ const c14n_ctx_t *ctx
++)
++{
++ axiom_data_source_t *src = NULL;
++ src = (axiom_data_source_t *)axiom_node_get_data_element((axiom_node_t *)node, ctx->env);
++
++ if (src == NULL)
++ return AXIS2_FAILURE;
++
++ axutil_stream_t *stream = axiom_data_source_get_stream(src, ctx->env);
++
++ if(stream == NULL)
++ return AXIS2_FAILURE;
++
++ axis2_char_t* buf = axutil_stream_get_buffer(stream, ctx->env);
++ int buflen = axutil_stream_get_len(stream, ctx->env);
++ if(buf == NULL || buflen < 0)
++ return AXIS2_FAILURE;
++
++ buf[buflen] = '\0'; /* buflen is an index here*/
++ C14N_BUFFER_ADD_STRING_WITH_LENGTH(ctx->outbuffer, ctx->env, buf, axutil_strlen(buf));
++
++ return AXIS2_SUCCESS;
++}
++
+ static int
+ ns_uri_compare(
+ const void *ns1,
diff --git a/rampartc-timestamp.patch b/rampartc-timestamp.patch
new file mode 100644
index 0000000..370a3e6
--- /dev/null
+++ b/rampartc-timestamp.patch
@@ -0,0 +1,12 @@
+diff -ur wso2-wsf-cpp-src-2.1.0.orig/wsf_c/rampartc/src/util/rampart_timestamp_token.c wso2-wsf-cpp-src-2.1.0/wsf_c/rampartc/src/util/rampart_timestamp_token.c
+--- wso2-wsf-cpp-src-2.1.0.orig/wsf_c/rampartc/src/util/rampart_timestamp_token.c 2009-10-13 15:04:10.000000000 -0400
++++ wso2-wsf-cpp-src-2.1.0/wsf_c/rampartc/src/util/rampart_timestamp_token.c 2012-07-17 17:45:46.455243717 -0400
+@@ -207,7 +207,7 @@
+ rampart_set_security_processed_result(env, msg_ctx,RAMPART_SPR_TS_EXPIRES, expires_val);
+
+ /* Check whether time has expired or not */
+- validity = rampart_compare_date_time(env, created_val, expires_val);
++ validity = rampart_compare_date_time(env, current_val, expires_val);
+ if (validity == AXIS2_FAILURE)
+ {
+ /* this means created_value > expires_value. Which is not valid */
diff --git a/wso2-wsf-cpp.spec b/wso2-wsf-cpp.spec
index f004d53..2352044 100644
--- a/wso2-wsf-cpp.spec
+++ b/wso2-wsf-cpp.spec
@@ -25,7 +25,7 @@
Name: %{pkg_name}
Summary: WSO2 Web Services Framework for C++
Version: %{pkg_ver}
-Release: 13%{?dist}
+Release: 14%{?dist}
Group: Development/Tools
License: ASL 2.0
URL: http://wso2.org/library/wsf/cpp
@@ -64,9 +64,10 @@ Patch7: axis2c_initBuffer_curl.patch
Patch8: axis2c_useENV_as_repopath.patch
# https://issues.apache.org/jira/browse/AXIS2C-1521
Patch9: axis2c_respectConst_sslCTX.patch
-# TODO: problems with ramapartc project fork
+# https://issues.apache.org/jira/browse/RAMPARTC-139
+Patch10: rampartc-timestamp.patch
# https://issues.apache.org/jira/browse/RAMPARTC-154
-#Patch10: rampart-trunk-c14n.patch
+Patch11: rampartc-c14n-new.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: openssl-devel
BuildRequires: httpd-devel
@@ -496,6 +497,8 @@ chmod a-x wsf_c/wsclient/LICENSE
%patch7 -p1
%patch8 -p1
%patch9 -p1
+%patch10 -p1
+%patch11 -p1
%build
%if %{build_sandesha2}
@@ -641,6 +644,10 @@ mv -f %{buildroot}/%{_includedir}/*.h %{buildroot}/%{_includedir}/%{pkg_name}
rm -rf %{buildroot}
%changelog
+* Fri Aug 24 2012 Peter MacKinnon <pmackinn at redhat.com> - 2.1.0-14
+- Added rampartc-timestamp.patch
+- Added rampartc-c14n-new.patch
+
* Fri Aug 24 2012 Peter MacKinnon <pmackinn at redhat.com> - 2.1.0-13
- Assigned modules dir to package
- Added RPM_OPT_FLAGS
More information about the scm-commits
mailing list