axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r423766 - in /webservices/axis2/trunk/c/rampart/src/omxmlsec: Makefile.am token_binary_security_token.c token_data_reference.c token_reference_list.c
Date Thu, 20 Jul 2006 04:59:50 GMT
Author: damitha
Date: Wed Jul 19 21:59:49 2006
New Revision: 423766

URL: http://svn.apache.org/viewvc?rev=423766&view=rev
Log:
Adding new token files

Added:
    webservices/axis2/trunk/c/rampart/src/omxmlsec/token_binary_security_token.c
    webservices/axis2/trunk/c/rampart/src/omxmlsec/token_data_reference.c
    webservices/axis2/trunk/c/rampart/src/omxmlsec/token_reference_list.c
Modified:
    webservices/axis2/trunk/c/rampart/src/omxmlsec/Makefile.am

Modified: webservices/axis2/trunk/c/rampart/src/omxmlsec/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/omxmlsec/Makefile.am?rev=423766&r1=423765&r2=423766&view=diff
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/omxmlsec/Makefile.am (original)
+++ webservices/axis2/trunk/c/rampart/src/omxmlsec/Makefile.am Wed Jul 19 21:59:49 2006
@@ -3,7 +3,8 @@
 #libomxmlsec_la_SOURCES = ctx.c enc.c transforms.c  buffer.c errors.c
 libomxmlsec_la_SOURCES = buffer.c error.c axis2_utils.c axiom.c \
                         token_encrypted_type.c token_encryption_method.c token_cipher_value.c
\
-                        token_cipher_data.c token_key_name.c token_key_info.c
+                        token_cipher_data.c token_key_name.c token_key_info.c token_binary_security_token.c
\
+                        token_reference_list.c token_data_reference.c
 
 libomxmlsec_la_LIBADD  = -lssl\
             -laxis2_util \

Added: webservices/axis2/trunk/c/rampart/src/omxmlsec/token_binary_security_token.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/omxmlsec/token_binary_security_token.c?rev=423766&view=auto
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/omxmlsec/token_binary_security_token.c (added)
+++ webservices/axis2/trunk/c/rampart/src/omxmlsec/token_binary_security_token.c Wed Jul 19
21:59:49 2006
@@ -0,0 +1,61 @@
+/*
+ *   Copyright 2003-2004 The Apache Software Foundation.
+ *
+ *   Licensed 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_binary_security_token.h>
+#include <axiom_attribute.h>
+#include <axiom_element.h>
+
+
+AXIS2_EXTERN axiom_node_t* AXIS2_CALL
+oxs_token_build_binary_security_token_element(const axis2_env_t *env,
+                        axiom_node_t *parent,
+                        axis2_char_t* id,
+                        axis2_char_t* encoding_type,
+                        axis2_char_t* value_type
+                    )
+{
+    axiom_node_t *binary_security_token_node = NULL;
+    axiom_element_t *binary_security_token_ele = NULL;
+    axiom_attribute_t *encoding_type_att = NULL, *value_type_att = NULL, *id_attr = NULL;
+    int ret; 
+    axiom_namespace_t *ns_obj = NULL;
+
+    ns_obj = axiom_namespace_create (env, OXS_WSSENS,
+                                              OXS_WSSE);
+
+    binary_security_token_ele = axiom_element_create(env, parent, OXS_NodeBinarySecurityToken,
ns_obj, &binary_security_token_node );
+    if(!binary_security_token_ele)
+    {   
+        oxs_error(ERROR_LOCATION,
+                    OXS_ERROR_ELEMENT_FAILED,"Error creating Binary Security Token element");
+        return NULL;
+    }  
+
+    id_attr = axiom_attribute_create(env, OXS_AttrId, id, NULL);
+    encoding_type_att =  axiom_attribute_create (env, OXS_AttrEncodingType, encoding_type,
NULL);
+    value_type_att =  axiom_attribute_create (env, OXS_AttrValueType, value_type, NULL);
+
+    ret = AXIOM_ELEMENT_ADD_ATTRIBUTE(binary_security_token_ele, env, id_attr, binary_security_token_node);
 
+    ret = AXIOM_ELEMENT_ADD_ATTRIBUTE(binary_security_token_ele, env, encoding_type_att,
binary_security_token_node);  
+    ret = AXIOM_ELEMENT_ADD_ATTRIBUTE(binary_security_token_ele, env, value_type_att, binary_security_token_node);
 
+   
+    return binary_security_token_node; 
+     
+}
+

Added: webservices/axis2/trunk/c/rampart/src/omxmlsec/token_data_reference.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/omxmlsec/token_data_reference.c?rev=423766&view=auto
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/omxmlsec/token_data_reference.c (added)
+++ webservices/axis2/trunk/c/rampart/src/omxmlsec/token_data_reference.c Wed Jul 19 21:59:49
2006
@@ -0,0 +1,55 @@
+/*
+ *   Copyright 2003-2004 The Apache Software Foundation.
+ *
+ *   Licensed 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_data_reference.h>
+#include <axiom_attribute.h>
+#include <axiom_element.h>
+
+
+AXIS2_EXTERN axiom_node_t* AXIS2_CALL
+oxs_token_build_data_reference_element(const axis2_env_t *env,
+                        axiom_node_t *parent,
+                        axis2_char_t* uri
+                    )
+{
+    axiom_node_t *data_reference_node = NULL;
+    axiom_element_t *data_reference_ele = NULL;
+    axiom_attribute_t *uri_attr = NULL;
+    int ret; 
+    axiom_namespace_t *ns_obj = NULL;
+
+    ns_obj = axiom_namespace_create (env, OXS_EncNs,
+                                              OXS_xenc);
+
+    data_reference_ele = axiom_element_create(env, parent, OXS_NodeDataReference, ns_obj,
&data_reference_node );
+    if(!data_reference_ele)
+    {   
+        oxs_error(ERROR_LOCATION,
+                    OXS_ERROR_ELEMENT_FAILED,"Error creating encryption method element");
+        return NULL;
+    }  
+
+    uri_attr =  axiom_attribute_create (env, OXS_AttrURI, uri, NULL);
+
+    ret = AXIOM_ELEMENT_ADD_ATTRIBUTE(data_reference_ele, env, uri_attr, data_reference_node);
 
+   
+    return data_reference_node; 
+     
+}
+

Added: webservices/axis2/trunk/c/rampart/src/omxmlsec/token_reference_list.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/omxmlsec/token_reference_list.c?rev=423766&view=auto
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/omxmlsec/token_reference_list.c (added)
+++ webservices/axis2/trunk/c/rampart/src/omxmlsec/token_reference_list.c Wed Jul 19 21:59:49
2006
@@ -0,0 +1,48 @@
+/*
+ *   Copyright 2003-2004 The Apache Software Foundation.
+ *
+ *   Licensed 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_reference_list.h>
+#include <axiom_element.h>
+
+
+AXIS2_EXTERN axiom_node_t* AXIS2_CALL
+oxs_token_build_reference_list_element(const axis2_env_t *env,
+                        axiom_node_t *parent
+                    )
+{
+    axiom_node_t *reference_list_node = NULL;
+    axiom_element_t *reference_list_ele = NULL;
+    axis2_status_t ret; 
+    axiom_namespace_t *ns_obj = NULL;
+
+    ns_obj = axiom_namespace_create (env, OXS_EncNs,
+                                              OXS_xenc);
+    
+
+    reference_list_ele = axiom_element_create(env, parent, OXS_NodeReferenceList, ns_obj,
&reference_list_node );
+    if(!reference_list_ele)
+    {   
+        oxs_error(ERROR_LOCATION,
+                    OXS_ERROR_ELEMENT_FAILED,"Error creating ReferenceList element");
+        return NULL;
+    }  
+ 
+    return reference_list_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