axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kausha...@apache.org
Subject svn commit: r504009 - in /webservices/axis2/trunk/c/rampart: include/oxs_token_encrypted_data.h include/oxs_token_signature.h src/omxmlsec/tokens/Makefile.am src/omxmlsec/tokens/token_signature.c
Date Tue, 06 Feb 2007 06:28:07 GMT
Author: kaushalye
Date: Mon Feb  5 22:28:06 2007
New Revision: 504009

URL: http://svn.apache.org/viewvc?view=rev&rev=504009
Log:
Adding ds:Signature token to OMXMLSecurity

Added:
    webservices/axis2/trunk/c/rampart/include/oxs_token_signature.h
    webservices/axis2/trunk/c/rampart/src/omxmlsec/tokens/token_signature.c
Modified:
    webservices/axis2/trunk/c/rampart/include/oxs_token_encrypted_data.h
    webservices/axis2/trunk/c/rampart/src/omxmlsec/tokens/Makefile.am

Modified: webservices/axis2/trunk/c/rampart/include/oxs_token_encrypted_data.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/include/oxs_token_encrypted_data.h?view=diff&rev=504009&r1=504008&r2=504009
==============================================================================
--- webservices/axis2/trunk/c/rampart/include/oxs_token_encrypted_data.h (original)
+++ webservices/axis2/trunk/c/rampart/include/oxs_token_encrypted_data.h Mon Feb  5 22:28:06
2007
@@ -20,7 +20,7 @@
 
 
 /**
-  * @file oxs_enc.h
+  * @file oxs_token_encrypted_data.h
   * @brief 
   */
 

Added: webservices/axis2/trunk/c/rampart/include/oxs_token_signature.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/include/oxs_token_signature.h?view=auto&rev=504009
==============================================================================
--- webservices/axis2/trunk/c/rampart/include/oxs_token_signature.h (added)
+++ webservices/axis2/trunk/c/rampart/include/oxs_token_signature.h Mon Feb  5 22:28:06 2007
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+#ifndef OXS_SIGNATURE_H
+#define OXS_SIGNATURE_H
+
+
+/**
+  * @file oxs_token_signature.h
+  * @brief 
+  */
+
+#include <axis2_defines.h>
+#include <axis2_env.h>
+#include <axiom_node.h>
+#include <axiom_element.h>
+#include <axis2_qname.h>
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+* ds:Signature  element
+*/
+AXIS2_EXTERN axiom_node_t* AXIS2_CALL
+oxs_token_build_signature_element(const axis2_env_t *env,
+                        axiom_node_t *parent,
+                        axis2_char_t* id
+                    );
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif                          /* OXS_SIGNATURE_H */

Modified: webservices/axis2/trunk/c/rampart/src/omxmlsec/tokens/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/omxmlsec/tokens/Makefile.am?view=diff&rev=504009&r1=504008&r2=504009
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/omxmlsec/tokens/Makefile.am (original)
+++ webservices/axis2/trunk/c/rampart/src/omxmlsec/tokens/Makefile.am Mon Feb  5 22:28:06
2007
@@ -7,7 +7,7 @@
                         token_x509_issuer_name.c token_x509_serial_number.c token_security_token_reference.c
\
 						token_embedded.c token_reference.c token_signature_value.c token_signed_info.c \
 						token_c14n_method.c token_signature_method.c token_digest_method.c token_digest_value.c
\
-						token_transform.c token_transforms.c
+						token_transform.c token_transforms.c token_signature.c
 
 liboxstokens_la_LIBADD  =../../../../util/src/libaxis2_util.la \
 			            ../../../../axiom/src/om/libaxis2_axiom.la 

Added: webservices/axis2/trunk/c/rampart/src/omxmlsec/tokens/token_signature.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/omxmlsec/tokens/token_signature.c?view=auto&rev=504009
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/omxmlsec/tokens/token_signature.c (added)
+++ webservices/axis2/trunk/c/rampart/src/omxmlsec/tokens/token_signature.c Mon Feb  5 22:28:06
2007
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+#include <stdio.h>
+#include <oxs_constants.h>
+#include <oxs_error.h>
+#include <oxs_token_signature.h>
+#include <axiom_attribute.h>
+#include <axiom_element.h>
+
+
+
+AXIS2_EXTERN axiom_node_t* AXIS2_CALL
+oxs_token_build_signature_element(const axis2_env_t *env,
+        axiom_node_t *parent,
+        axis2_char_t* id)
+{
+    axiom_node_t *signature_node = NULL;
+    axiom_element_t *signature_ele = NULL;
+    axiom_attribute_t *id_attr = NULL;
+    axiom_namespace_t *ns_obj = NULL;
+    int ret;
+
+    ns_obj = axiom_namespace_create(env, OXS_DSIG_NS,
+            OXS_DS);
+
+    signature_ele = axiom_element_create(env, parent, OXS_NODE_SIGNATURE, ns_obj, &signature_node);
+    if (!signature_ele)
+    {
+        oxs_error(env, ERROR_LOCATION,
+                OXS_ERROR_ELEMENT_FAILED, "Error creating ds:Signature element");
+        return NULL;
+    }
+
+    /*If id is not NULL then add it as an attribute*/
+    if (id)
+    {
+        id_attr = axiom_attribute_create(env, OXS_ATTR_ID, id, NULL);
+        ret = AXIOM_ELEMENT_ADD_ATTRIBUTE(signature_ele, env, id_attr, signature_node);
+    }
+
+    return signature_node;
+
+}
+



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message