Author: milinda
Date: Wed Nov 14 20:42:29 2007
New Revision: 595204
URL: http://svn.apache.org/viewvc?rev=595204&view=rev
Log:
Adding header file for trust implementation.
Added:
webservices/rampart/trunk/c/include/trust_constants.h
webservices/rampart/trunk/c/include/trust_context.h
webservices/rampart/trunk/c/include/trust_policy_util.h
webservices/rampart/trunk/c/include/trust_sts_client.h
webservices/rampart/trunk/c/include/trust_token.h
webservices/rampart/trunk/c/include/trust_util.h
Added: webservices/rampart/trunk/c/include/trust_constants.h
URL:
http://svn.apache.org/viewvc/webservices/rampart/trunk/c/include/trust_constants.h?rev=595204&view=auto
==============================================================================
--- webservices/rampart/trunk/c/include/trust_constants.h (added)
+++ webservices/rampart/trunk/c/include/trust_constants.h Wed Nov 14 20:42:29
2007
@@ -0,0 +1,142 @@
+/*
+* 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 TRUST_CONSTANTS_H
+#define TRUST_CONSTANTS_H
+
+/**
+* @file trust_constants.h
+* @brief Holds constants for trust implementation
+*/
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /*Trust XML Element names */
+#define TRUST_RST_CONTEXT "Context"
+#define TRUST_TOKEN_TYPE "TokenType"
+#define TRUST_REQUEST_TYPE "RequestType"
+#define TRUST_APPLIES_TO "AppliesTo"
+
+#define TRUST_KEY_TYPE "KeyType"
+#define TRUST_KEY_SIZE "KeySize"
+
+#define TRUST_CLAIMS "Claims"
+#define TRUST_CLAIMS_DIALECT "Dialect"
+
+#define TRUST_ENTROPY "Entropy"
+#define TRUST_BINARY_SECRET "BinarySecret"
+
+#define TRUST_LIFE_TIME "LifeTime"
+#define TRUST_LIFE_TIME_CREATED "Created"
+#define TRUST_LIFE_TIME_EXPIRES "Expires"
+
+#define TRUST_REQUEST_SECURITY_TOKEN "RequestSecurityToken"
+#define TRUST_REQUESTED_SECURITY_TOKEN "RequestedSecurityToken"
+#define TRUST_REQUEST_SECURITY_TOKEN_RESPONSE "RequestSecurityTokenResponse"
+#define TRUST_REQUESTED_PROOF_TOKEN "RequestedProofToken"
+#define TRUST_REQUEST_SECURITY_TOKEN_RESPONSE_COLLECTION
"RequestSecurityTokenResponseCollection"
+#define TRUST_REQUESTED_TOKEN_CANCELED "RequestedTokenCancelled"
+#define TRUST_COMPUTED_KEY_ALGO "ComputedKeyAlgorithm"
+#define TRUST_COMPUTED_KEY "ComputedKey"
+#define TRUST_REQUESTED_ATTACHED_REFERENCE "RequestedAttachedReference"
+#define TRUST_REQUESTED_UNATTACHED_REFERENCE "RequestedUnattachedReference"
+#define TRUST_SECURITY_TOKEN_REFERENCE "SecurityTokenReference"
+#define TRUST_ENCRYPTED_DATA "EncryptedData"
+#define TRUST_REQUESTED_TOKEN_CANCELED "RequestedTokenCancelled"
+#define TRUST_CANCEL_TARGET "CancelTarget"
+#define TRUST_URI "URI"
+#define TRUST_EPR "EndpointReference"
+#define TRUST_EPR_ADDRESS "Address"
+#define TRUST_STR_REFERENCE "Reference"
+
+ /* Renewal Bindings */
+#define TRUST_RENEW_TARGET "RenewTarget"
+#define TRUST_ALLOW_POSTDATING "AllowPostdating"
+#define TRUST_RENEWING "Renewing"
+
+#define TRUST_RENEW_ALLOW_ATTR "Allow"
+#define TRUST_RENEW_OK_ATTR "OK"
+
+#define TRUST_VALIDATION_STATUS "Status"
+#define TRUST_VALIDATION_CODE "Code"
+#define TRUST_VALIDATION_REASON "Reason"
+
+#define TRUST_CANCEL_TARGET "CancelTarget"
+
+
+#define ATTR_TYPE "Type"
+#define TRUST_BIN_SEC_TYPE_NONCE "/Nonce"
+
+ /* Request Types */
+#define TRUST_REQ_TYPE_ISSUE "/Issue"
+#define TRUST_REQ_TYPE_VALIDATE "/Validate"
+#define TRUST_REQ_TYPE_RENEW "/Renew"
+#define TRUST_REQ_TYPE_CANCEL "/Cancel"
+
+#define TRUST_RST_ACTION_ISSUE "/RST/Issue"
+#define TRUST_RST_ACTION_VALIDATE "/RST/Validate"
+#define TRUST_RST_ACTION_RENEW "/RST/Renew"
+#define TRUST_RST_ACTION_CANCEL "/RST/Cancel"
+#define TRUST_RST_ACTION_SCT "/RST/SCT"
+#define TRUST_RST_ACTION_CANCEL_SCT "/RST/SCT/Cancel"
+
+#define TRUST_KEY_TYPE_SYMM_KEY "/SymmetricKey"
+#define TRUST_KEY_TYPE_PUBLIC_KEY "/PublicKey"
+#define TRUST_KEY_TYPE_BEARER "/Bearer"
+
+ /* Trust Namespace URIs and Namespace prefix */
+#define TRUST_S11 "S11"
+#define TRUST_S11_XMLNS "http://schemas.xmlsoap.org/soap/envelope/"
+#define TRUST_S12 "S12"
+#define TRUST_S12_XMLNS "http://www.w3.org/2003/05/soap-envelope"
+#define TRUST_WSU "wsu"
+#define TRUST_WSU_XMLNS
"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+#define TRUST_WSSE "wsse"
+#define TRUST_WSSE_XMLNS
"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
+#define TRUST_WST "wst"
+#define TRUST_WST_XMLNS "http://schemas.xmlsoap.org/ws/2005/02/trust"
+#define TRUST_DS "ds"
+#define TRUST_DS_XMLNS "http://www.w3.org/2000/09/xmldsig#"
+#define TRUST_XENC "xenc"
+#define TRUST_XENC_XMLNS "http://www.w3.org/2001/04/xmlenc#"
+#define TRUST_WSP "wsp"
+#define TRUST_WSP_XMLNS "http://schemas.xmlsoap.org/ws/2004/09/policy"
+#define TRUST_WSA "wsa"
+#define TRUST_WSA_XMLNS "http://schemas.xmlsoap.org/ws/2004/08/addressing"
+#define TRUST_XS "xs"
+#define TRUST_XS_XMLNS "http://www.w3.org/2001/XMLSchema"
+
+/* NS Versions */
+
+#define TRUST_VERSION_05_02 1
+#define TRUST_VERSION_05_12 2
+
+
+/* WS-SX Namespaces*/
+
+#define TRUST_WST_XMLNS_05_12
"http://docs.oasis-open.org/ws-sx/ws-trust/200512"
+#define TRUST_WST_XMLNS_05_02 "http://schemas.xmlsoap.org/ws/2005/02/trust"
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* TRUST_CONSTANTS_H*/
Added: webservices/rampart/trunk/c/include/trust_context.h
URL:
http://svn.apache.org/viewvc/webservices/rampart/trunk/c/include/trust_context.h?rev=595204&view=auto
==============================================================================
--- webservices/rampart/trunk/c/include/trust_context.h (added)
+++ webservices/rampart/trunk/c/include/trust_context.h Wed Nov 14 20:42:29 2007
@@ -0,0 +1,197 @@
+
+/*
+ * 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 TRUST_CONTEXT_H
+#define TRUST_CONTEXT_H
+
+/**
+ * @file trust_context.h
+ * @brief Holds function declarations and data for data
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <axutil_utils.h>
+#include <axutil_string.h>
+#include <axutil_base64.h>
+#include <axiom_soap.h>
+#include <axiom.h>
+#include <axis2_msg_ctx.h>
+#include <axis2_addr.h>
+#include <trust_constants.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ typedef struct trust_context trust_context_t;
+
+ AXIS2_EXTERN trust_context_t *AXIS2_CALL
+ trust_context_create(
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * in_msg_ctx);
+
+ AXIS2_EXTERN void AXIS2_CALL
+ trust_context_free(
+ trust_context_t * trust_context,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_context_process_applies_to(
+ trust_context_t * trust_context,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+ trust_context_process_request_context(
+ trust_context_t * trust_context,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_context_process_request_type(
+ trust_context_t * trust_context,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_context_process_applies_to(
+ trust_context_t * trust_context,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_context_process_life_time(
+ trust_context_t * trust_context,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_context_process_claims(
+ trust_context_t * trust_context,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_context_process_entorpy(
+ trust_context_t * trust_context,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_context_process_token_type(
+ trust_context_t * trust_context,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_context_process_entropy(
+ trust_context_t * trust_context,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_context_process_key_type(
+ trust_context_t * data,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_context_process_key_size(
+ trust_context_t * data,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ trust_context_get_token_type(
+ trust_context_t * trust_context,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_context_set_token_type(
+ trust_context_t * trust_context,
+ const axutil_env_t * env,
+ axis2_char_t *token_type);
+
+ AXIS2_EXTERN axiom_node_t * AXIS2_CALL
+ trust_context_get_rst_node(
+ trust_context_t * trust_context,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_context_set_rst_node(
+ trust_context_t * trust_context,
+ const axutil_env_t * env,
+ axiom_node_t *rst_node);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ trust_context_get_request_type(
+ trust_context_t * trust_context,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_context_set_request_type(
+ trust_context_t * trust_context,
+ const axutil_env_t * env,
+ axis2_char_t *request_type);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ trust_context_get_soap_ns(
+ trust_context_t * trust_context,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ trust_context_get_wst_ns(
+ trust_context_t * trust_context,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_char_t * AXIS2_CALL
+ trust_context_get_appliesto_address(
+ trust_context_t *trust_context,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axiom_node_t * AXIS2_CALL
+ trust_context_get_appliesto_epr_node(
+ trust_context_t *trust_context,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_char_t * AXIS2_CALL
+ trust_context_get_rst_context_attr(
+ trust_context_t *trust_context,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ trust_context_get_key_type(
+ trust_context_t *trust_context,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN int AXIS2_CALL
+ trust_context_get_key_size(
+ trust_context_t *trust_context,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_char_t * AXIS2_CALL
+ trust_context_get_request_entropy(
+ trust_context_t *trust_context,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axiom_node_t * AXIS2_CALL
+ trust_context_get_claims_node(
+ trust_context_t *trust_context,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_char_t * AXIS2_CALL
+ trust_context_get_claims_dialect(
+ trust_context_t * trust_context,
+ const axutil_env_t *env);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /*TRUST_CONTEXT_H */
Added: webservices/rampart/trunk/c/include/trust_policy_util.h
URL:
http://svn.apache.org/viewvc/webservices/rampart/trunk/c/include/trust_policy_util.h?rev=595204&view=auto
==============================================================================
--- webservices/rampart/trunk/c/include/trust_policy_util.h (added)
+++ webservices/rampart/trunk/c/include/trust_policy_util.h Wed Nov 14 20:42:29
2007
@@ -0,0 +1,52 @@
+
+/*
+* 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 TRUST_POLICY_UTIL_H
+#define TRUST_POLICY_UTIL_H
+
+#include <axutil_utils.h>
+#include <rp_includes.h>
+#include <rp_secpolicy.h>
+#include <neethi_policy.h>
+#include <rp_secpolicy_builder.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ AXIS2_EXTERN rp_algorithmsuite_t *AXIS2_CALL
+ trust_policy_util_get_algorithmsuite(
+ const axutil_env_t * env,
+ neethi_policy_t * policy);
+
+ AXIS2_EXTERN rp_binding_commons_t *AXIS2_CALL
+ trust_policy_util_get_binding_commons(
+ const axutil_env_t * env,
+ rp_secpolicy_t * secpolicy);
+
+ AXIS2_EXTERN rp_trust10_t *AXIS2_CALL
+ trust_policy_util_get_trust10(
+ const axutil_env_t * env,
+ neethi_policy_t * policy);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TRUST_POLICY_UTIL_H */
Added: webservices/rampart/trunk/c/include/trust_sts_client.h
URL:
http://svn.apache.org/viewvc/webservices/rampart/trunk/c/include/trust_sts_client.h?rev=595204&view=auto
==============================================================================
--- webservices/rampart/trunk/c/include/trust_sts_client.h (added)
+++ webservices/rampart/trunk/c/include/trust_sts_client.h Wed Nov 14 20:42:29
2007
@@ -0,0 +1,136 @@
+
+/*
+* 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 TRUST_STS_CLIENT
+#define TRUST_STS_CLIENT
+
+/**
+ * @file trust_sts_client.h
+ * @brief contains the specific sts client interface
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <axiom.h>
+#include <axutil_utils.h>
+#include <axis2_client.h>
+#include <rp_includes.h>
+#include <rp_secpolicy.h>
+#include <neethi_policy.h>
+#include <neethi_util.h>
+#include <rampart_util.h>
+#include <trust_constants.h>
+#include <trust_util.h>
+#include <trust_policy_util.h>
+#include <trust_token.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ typedef struct trust_sts_client trust_sts_client_t;
+
+ AXIS2_EXTERN trust_sts_client_t *AXIS2_CALL
+ trust_sts_client_create(
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN void AXIS2_CALL
+ trust_sts_client_free(
+ trust_sts_client_t * sts_client,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN void AXIS2_CALL
+ trust_sts_client_request_security_token(
+ trust_sts_client_t * sts_client,
+ const axutil_env_t * env,
+ axis2_char_t * applies_to,
+ axis2_char_t * token_type);
+
+ AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+ trust_sts_client_create_issue_request(
+ trust_sts_client_t * sts_client,
+ const axutil_env_t * env,
+ axis2_char_t * request_type,
+ axis2_char_t * applies_to,
+ axis2_char_t * token_type);
+
+ AXIS2_EXTERN axiom_node_t * AXIS2_CALL
+ trust_sts_client_create_renew_request(
+ trust_sts_client_t *sts_client,
+ const axutil_env_t *env,
+ axis2_char_t *token_type,
+ axis2_char_t *request_type,
+ axiom_node_t *renew_target,
+ axis2_bool_t allow_postdating,
+ trust_allow_t renew_allow,
+ trust_ok_t ok_flag);
+
+ AXIS2_EXTERN axiom_node_t * AXIS2_CALL
+ tust_sts_client_create_cancel_request(
+ trust_sts_client_t *sts_client,
+ const axutil_env_t *env,
+ axis2_char_t *request_type,
+ axiom_node_t *cancel_target);
+
+ AXIS2_EXTERN axiom_node_t * AXIS2_CALL
+ trust_sts_client_create_validate_request(
+ trust_sts_client_t *sts_client,
+ const axutil_env_t *env,
+ axis2_char_t *token_type,
+ axis2_char_t *request_type);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_sts_client_process_policies(
+ trust_sts_client_t * sts_client,
+ const axutil_env_t * env,
+ neethi_policy_t * issuer_policy,
+ neethi_policy_t * service_policy);
+
+ AXIS2_EXTERN axis2_svc_client_t *AXIS2_CALL
+ trust_sts_client_get_svc_client(
+ trust_sts_client_t * sts_client,
+ const axutil_env_t * env,
+ axis2_char_t * action);
+
+ AXIS2_EXTERN trust_token_t *AXIS2_CALL
+ trust_sts_client_process_issue_response(
+ trust_sts_client_t * sts_client,
+ const axutil_env_t * env,
+ int wst_version,
+ axiom_node_t * response_node,
+ axiom_node_t * payload_sent);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ trust_sts_client_find_identifier(
+ trust_sts_client_t * sts_client,
+ axiom_node_t * req_att_ref_node,
+ axiom_node_t * req_unatt_ref_node,
+ axiom_node_t * sec_token_node,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ trust_sts_client_get_id_from_str(
+ trust_sts_client_t * sts_client,
+ axiom_node_t * ref_node,
+ const axutil_env_t * env);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /*TRUST_STS_CLIENT_H */
Added: webservices/rampart/trunk/c/include/trust_token.h
URL:
http://svn.apache.org/viewvc/webservices/rampart/trunk/c/include/trust_token.h?rev=595204&view=auto
==============================================================================
--- webservices/rampart/trunk/c/include/trust_token.h (added)
+++ webservices/rampart/trunk/c/include/trust_token.h Wed Nov 14 20:42:29 2007
@@ -0,0 +1,346 @@
+/*
+ * 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 TRUST_TOKEN_H
+#define TRUST_TOKEN_H
+
+/**
+ * @file trust_token.h
+ * @brief Holds function declarations and data for token
+ */
+
+#include <axiom.h>
+#include <axutil_utils.h>
+#include <trust_constants.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ /* Security token states. */
+ typedef enum {
+ ISSUED = 1,
+ EXPIRED,
+ CANCELED,
+ RENEWED
+ }trust_token_state_t;
+
+ typedef struct trust_token trust_token_t;
+
+ /**
+ *Create trust token with given id, token node and life element data
+ [EMAIL PROTECTED] env const pointer to axutil environment
+ [EMAIL PROTECTED] id Token identifier
+ [EMAIL PROTECTED] toke_node Actual token axiom node
+ [EMAIL PROTECTED] life_node Life axiom node containing created and
expire dates
+ [EMAIL PROTECTED] pointer to trust_token_t
+ */
+ AXIS2_EXTERN trust_token_t* AXIS2_CALL
+ trust_token_create(
+ const axutil_env_t *env,
+ axis2_char_t *id,
+ axiom_node_t *token_node,
+ axiom_node_t *life_node);
+
+ /**
+ *Create trust token with given id, token node, created date and expire
date
+ [EMAIL PROTECTED] env const pointer to axutil environment
+ [EMAIL PROTECTED] id Token identifier
+ [EMAIL PROTECTED] toke_node Actual token axiom node
+ [EMAIL PROTECTED] created Date which token is created
+ [EMAIL PROTECTED] expire Date which token will expire
+ [EMAIL PROTECTED] pointer to trust_token_t
+ */
+ AXIS2_EXTERN trust_token_t* AXIS2_CALL
+ trust_token_create_with_dates(
+ const axutil_env_t *env,
+ axis2_char_t *id,
+ axiom_node_t *token_node,
+ axutil_date_time_t *created,
+ axutil_date_time_t *expire);
+
+ /**
+ *Process the life element of the token which represent by the following
xml format
+ *assign values to related fields.
+ *<wst:LifeTime>
+ * <wsu:Created>...</wsu:Created>
+ * <wsu:Expires>...</wsu:Expires>
+ *</wst:LifeTime>
+ [EMAIL PROTECTED] env const pointer to axutil environment
+ [EMAIL PROTECTED] life_node Axiom node containing created and
expire dates
+ [EMAIL PROTECTED] token Trust token containing token data
+ [EMAIL PROTECTED] status of the life element processing
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_token_process_life_elem(
+ const axutil_env_t *env,
+ axiom_node_t *life_node,
+ trust_token_t *token);
+
+ /**
+ *Get the change status of trust token
+ [EMAIL PROTECTED] env const pointer to axutil environment
+ [EMAIL PROTECTED] token Trust token structure
+ [EMAIL PROTECTED] axis2_bool_t whether the token is changed or not
+ */
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ trust_token_is_changed(
+ const axutil_env_t *env,
+ trust_token_t *token);
+
+ /**
+ *Set the change status of trust token
+ [EMAIL PROTECTED] env const pointer to axutil environment
+ [EMAIL PROTECTED] token Trust token structure
+ [EMAIL PROTECTED] changed Bollean value representing the if token is
changed
+ [EMAIL PROTECTED] axis2_status_t whether the operation is successful or
not
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_token_set_changed(
+ const axutil_env_t *env,
+ trust_token_t *token,
+ axis2_bool_t changed);
+
+ /**
+ *Get the state of trust token
+ [EMAIL PROTECTED] env const pointer to axutil environment
+ [EMAIL PROTECTED] token Trust token structure
+ [EMAIL PROTECTED] trust_token_state_t token's state can be ISSUED,
EXPIRED, CANCELLED, RENEWED
+ */
+ AXIS2_EXTERN trust_token_state_t AXIS2_CALL
+ trust_token_get_state(
+ const axutil_env_t *env,
+ trust_token_t *token);
+
+ /**
+ *Set the state of trust token
+ [EMAIL PROTECTED] env const pointer to axutil environment
+ [EMAIL PROTECTED] token Trust token structure
+ [EMAIL PROTECTED] state State of the trust token
+ [EMAIL PROTECTED] axis2_status_t whether the set operation is successful
or not
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_token_set_state(
+ const axutil_env_t *env,
+ trust_token_t *token,
+ trust_token_state_t state);
+
+ /**
+ *Get the actual token om node of trust token
+ [EMAIL PROTECTED] env const pointer to axutil environment
+ [EMAIL PROTECTED] token Trust token structure
+ [EMAIL PROTECTED] axiom_node_t axiom node pointer for token
+ */
+ AXIS2_EXTERN axiom_node_t* AXIS2_CALL
+ trust_token_get_token(
+ const axutil_env_t *env,
+ trust_token_t *token);
+
+ /**
+ *Set the actual token om node of trust token
+ [EMAIL PROTECTED] env const pointer to axutil environment
+ [EMAIL PROTECTED] token Trust token structure
+ [EMAIL PROTECTED] token_node axiom node pointer for token
+ [EMAIL PROTECTED] axis2_status_t whether the set operation is successful
or not
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_token_set_token(
+ const axutil_env_t *env,
+ trust_token_t *token,
+ axiom_node_t *token_node);
+
+ /**
+ *Get the identifier of trust token
+ [EMAIL PROTECTED] env const pointer to axutil environment
+ [EMAIL PROTECTED] token Trust token structure
+ [EMAIL PROTECTED] axis2_char_t identifier string of token
+ */
+ AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+ trust_token_get_id(
+ const axutil_env_t *env,
+ trust_token_t *token);
+
+ /**
+ *Get the actual previous token om node of trust token
+ [EMAIL PROTECTED] env const pointer to axutil environment
+ [EMAIL PROTECTED] token Trust token structure
+ [EMAIL PROTECTED] axiom_node_t axiom node pointer for previous token
+ */
+ AXIS2_EXTERN axiom_node_t* AXIS2_CALL
+ trust_token_get_previous_token(
+ const axutil_env_t *env,
+ trust_token_t *token);
+
+ /**
+ *Set the actual token om node of trust token's previous token
+ [EMAIL PROTECTED] env const pointer to axutil environment
+ [EMAIL PROTECTED] token Trust token structure
+ [EMAIL PROTECTED] prev_token axiom node pointer for previous token
+ [EMAIL PROTECTED] axis2_status_t whether the set operation is successful
or not
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_token_set_previous_token(
+ const axutil_env_t *env,
+ trust_token_t *token,
+ axiom_node_t *prev_token);
+
+ /* **
+ * @return Returns the secret.
+
+ public byte[] getSecret() {
+ return secret;
+ } */
+
+ /**
+ * @param secret The secret to set.
+
+ public void setSecret(byte[] secret) {
+ this.secret = secret;
+ }*/
+
+ /**
+ *Get the attached reference of trust token
+ [EMAIL PROTECTED] env const pointer to axutil environment
+ [EMAIL PROTECTED] token Trust token structure
+ [EMAIL PROTECTED] axiom_node_t axiom node pointer for attached reference
+ */
+ AXIS2_EXTERN axiom_node_t* AXIS2_CALL
+ trust_token_get_attached_reference(
+ const axutil_env_t *env,
+ trust_token_t *token);
+
+ /**
+ *Set the attached reference of trust token
+ [EMAIL PROTECTED] env const pointer to axutil environment
+ [EMAIL PROTECTED] token Trust token structure
+ [EMAIL PROTECTED] attached_reference axiom node pointer for attached
reference
+ [EMAIL PROTECTED] axis2_status_t whether the set operation is successful
or not
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_token_set_attached_reference(
+ const axutil_env_t *env,
+ trust_token_t *token,
+ axiom_node_t *attached_reference);
+
+ /**
+ *Get the unattached reference of trust token
+ [EMAIL PROTECTED] env const pointer to axutil environment
+ [EMAIL PROTECTED] token Trust token structure
+ [EMAIL PROTECTED] axiom_node_t axiom node pointer for unattached reference
+ */
+ AXIS2_EXTERN axiom_node_t* AXIS2_CALL
+ trust_token_get_unattached_reference(
+ const axutil_env_t *env,
+ trust_token_t *token);
+
+ /**
+ *Set the unattached reference of trust token
+ [EMAIL PROTECTED] env const pointer to axutil environment
+ [EMAIL PROTECTED] token Trust token structure
+ [EMAIL PROTECTED] attached_reference axiom node pointer for unattached
reference
+ [EMAIL PROTECTED] axis2_status_t whether the set operation is successful
or not
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_token_set_unattached_reference(
+ const axutil_env_t *env,
+ trust_token_t *token,
+ axiom_node_t *unattached_reference);
+
+ /**
+ *Get the created date of trust token
+ [EMAIL PROTECTED] env const pointer to axutil environment
+ [EMAIL PROTECTED] token Trust token structure
+ [EMAIL PROTECTED] axutil_date_time_t ceated date
+ */
+ AXIS2_EXTERN axutil_date_time_t* AXIS2_CALL
+ trust_token_get_created(
+ const axutil_env_t *env,
+ trust_token_t *token);
+
+ /**
+ *Set the created date of trust token
+ [EMAIL PROTECTED] env const pointer to axutil environment
+ [EMAIL PROTECTED] token Trust token structure
+ [EMAIL PROTECTED] created date which token is created
+ [EMAIL PROTECTED] axis2_status_t whether the set operation is successful
or not
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_token_set_created(
+ const axutil_env_t *env,
+ trust_token_t *token,
+ axutil_date_time_t *created);
+
+ /**
+ *Get the expire date of trust token
+ [EMAIL PROTECTED] env const pointer to axutil environment
+ [EMAIL PROTECTED] token Trust token structure
+ [EMAIL PROTECTED] axutil_date_time_t expire date
+ */
+ AXIS2_EXTERN axutil_date_time_t* AXIS2_CALL
+ trust_token_get_expires(
+ const axutil_env_t *env,
+ trust_token_t *token);
+
+ /**
+ *Set the expire date of trust token
+ [EMAIL PROTECTED] env const pointer to axutil environment
+ [EMAIL PROTECTED] token Trust token structure
+ [EMAIL PROTECTED] expire Expire date of token
+ [EMAIL PROTECTED] axis2_status_t whether the set operation is successful
or not
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_token_set_expires(
+ const axutil_env_t *env,
+ trust_token_t *token,
+ axutil_date_time_t *expire);
+
+ /**
+ *Get the issuer's address of token
+ [EMAIL PROTECTED] env const pointer to axutil environment
+ [EMAIL PROTECTED] token Trust token structure
+ [EMAIL PROTECTED] axis2_char_t* issuer's address
+ */
+ AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+ trust_token_get_issuer_address(
+ const axutil_env_t *env,
+ trust_token_t *token);
+
+ /**
+ *Set the issuer's address of token
+ [EMAIL PROTECTED] env const pointer to axutil environment
+ [EMAIL PROTECTED] token Trust token structure
+ [EMAIL PROTECTED] issuer_address issure's address string
+ [EMAIL PROTECTED] axis2_status_t whether the set operation is successful
or not
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_token_set_issuer_address(
+ const axutil_env_t *env,
+ trust_token_t *token,
+ axis2_char_t *issuer_address);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_token_process_life_elem(
+ const axutil_env_t *env,
+ axiom_node_t *life_node,
+ trust_token_t *token);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*TRUST_TOKEN_H*/
+
Added: webservices/rampart/trunk/c/include/trust_util.h
URL:
http://svn.apache.org/viewvc/webservices/rampart/trunk/c/include/trust_util.h?rev=595204&view=auto
==============================================================================
--- webservices/rampart/trunk/c/include/trust_util.h (added)
+++ webservices/rampart/trunk/c/include/trust_util.h Wed Nov 14 20:42:29 2007
@@ -0,0 +1,437 @@
+
+/*
+* 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 TRUST_UTIL
+#define TRUST_UTIL
+
+/**
+* @file trust_util.h
+* @brief contains generic operations related to trust module
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <axiom.h>
+#include <axutil_utils.h>
+#include <axutil_string.h>
+
+#include <trust_constants.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ typedef enum
+ {
+ TRUST_ALLOW = 0,
+ TRUST_NOT_ALLOW
+ } trust_allow_t;
+
+ typedef enum
+ {
+ TRUST_OK = 0,
+ TRUST_NOT_OK
+ } trust_ok_t;
+
+ /**
+ * Create the RST Element for Issuance binding.
+ * <wst:RequestSecurityToken>
+ * ...
+ * ...
+ * </wst:RequestSecurityToken>
+ * @param env pointer to environment struct
+ * @param wst_verson integer representing wst version
+ * @param context string representing contest of the request, can be NULL
+ * @returns RST axiom node, NULL if error occurred.
+ */
+ AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+ trust_util_create_rst_element(
+ const axutil_env_t * env,
+ int wst_version,
+ axis2_char_t * context);
+
+ /**
+ * Create the RSTR Element for Issuance binding.
+ * <wst:RequestSecurityTokenResponse>
+ * ...
+ * ...
+ * </wst:RequestSecurityTokenResponse>
+ * @param env pointer to environment struct
+ * @param wst_verson integer representing wst version
+ * @param context string representing contest of the request, can be NULL
+ * @returns RSTR axiom node, NULL if error ocurred.
+ */
+ AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+ trust_util_create_rstr_element(
+ const axutil_env_t * env,
+ int wst_version,
+ axis2_char_t * context);
+
+ /**
+ * Create the RSTRC Element for Issuance binding.
+ * <wst:RequestSecurityTokenResponseCollection>
+ * ...
+ * ...
+ * </wst:RequestSecurityTokenResponseCollection>
+ * @param env pointer to environment struct
+ * @param wst_verson integer representing wst version
+ * @returns RSTRC axiom node, NULL if error ocurred.
+ */
+ AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+ trust_util_create_rstr_collection_element(
+ const axutil_env_t * env,
+ int wst_version);
+
+ /**
+ * Create the RequestType Element for Issuance binding.
+ * <wst:RequestType> .... </wst:RequestType>
+ * @param env pointer to environment struct
+ * @param wst_verson integer representing wst version
+ * @param parent_node parent axiom node
+ * @param request_type string representing request type
+ * @returns RequestType axiom node, NULL if error ocurred.
+ */
+ AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+ trust_util_create_request_type_element(
+ const axutil_env_t * env,
+ int wst_version,
+ axiom_node_t * parent_node,
+ axis2_char_t * request_type);
+
+ /**
+ * Create the TokenType Element for Issuance binding.
+ * <wst:TokenType> .... </wst:TokenType>
+ * @param env pointer to environment struct
+ * @param wst_verson integer representing wst version
+ * @param parent_node parent axiom node
+ * @param token_type string representing token type
+ * @returns TokenType axiom node, NULL if error ocurred.
+ */
+ AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+ trust_util_create_token_type_element(
+ const axutil_env_t * env,
+ int wst_version,
+ axiom_node_t * parent_node,
+ axis2_char_t * token_type);
+
+ /**
+ * Create the AppliesTo Element for Issuance binding.
+ * AppliesTo element Specifies the scope for which the security token is
desired.
+ * Same as TokenType. AppliesTo is higher in precedence than TokenType
+ * <wsp:AppliesTo>
+ * <wsa:EndpointReference>
+ * <wsa:Address> ... </wsa:Address>
+ * </wsa:EndpointReference>
+ * </wsp:AppliesTo>
+ * @param env pointer to environment struct
+ * @param wst_verson integer representing wst version
+ * @param parent_node parent axiom node
+ * @param token_type string representing token type
+ * @returns TokenType axiom node, NULL if error ocurred.
+ */
+ AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+ trust_util_create_applies_to_element(
+ const axutil_env_t * env,
+ axiom_node_t * parent_node,
+ const axis2_char_t * address,
+ const axis2_char_t * addressing_ns);
+
+ /**
+ *Claims :Requests a set of specific claims. These claims are identified
by using the
+ * service's policy
+ [EMAIL PROTECTED] :URI to indicate the syntax of the claims
+ **/
+
+ AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+ trust_util_create_claims_element(
+ const axutil_env_t * env,
+ int wst_version,
+ axiom_node_t * parent_node,
+ axiom_node_t * claims_content,
+ axis2_char_t * dialect_uri);
+
+ /**
+ * Create the RequestedSecurityToken Element for Issuance binding.
+ * <wst:RequestedSecurityToken> .... </wst:RequestedSecurityToken>
+ * @param env pointer to environment struct
+ * @param wst_verson integer representing wst version
+ * @param parent_node parent axiom node
+ * @returns RequestedSecurityToken axiom node, NULL if error ocurred.
+ */
+ AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+ trust_util_create_requested_security_token_element(
+ const axutil_env_t * env,
+ int wst_version,
+ axiom_node_t * parent_node);
+
+ /**
+ * Create the RequestedProofToken Element for Issuance binding.
+ * <wst:RequestedProofToken> .... </wst:RequestedProofToken>
+ * @param env pointer to environment struct
+ * @param wst_verson integer representing wst version
+ * @param parent_node parent axiom node
+ * @returns RequestedSecurityToken axiom node, NULL if error ocurred.
+ */
+ AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+ trust_util_create_requsted_proof_token_element(
+ const axutil_env_t * env,
+ int wst_version,
+ axiom_node_t * parent_node);
+
+ /**
+ * Create the Entropy Element for Issuance binding. User must set the
content.
+ * <wst:Entropy> .... </wst:Entropy>
+ * Entropy element specifies the entropy that is to be used for creating
the key
+ * according to the service's policy.
+ * @param env pointer to environment struct
+ * @param wst_verson integer representing wst version
+ * @param parent_node parent axiom node
+ * @returns Entropy axiom node, NULL if error ocurred.
+ */
+ AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+ trust_util_create_entropy_element(
+ const axutil_env_t * env,
+ int wst_version,
+ axiom_node_t * parent_node);
+
+ /**
+ * Create the ComputedKey Element for Issuance binding.
+ * <wst:ComputedKey> .... </wst:ComputedKey>
+ * User must set the inside content for this node.
+ * @param env pointer to environment struct
+ * @param wst_verson integer representing wst version
+ * @param parent_node parent axiom node
+ * @returns RequestedSecurityToken axiom node, NULL if error ocurred.
+ */
+ AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+ trust_util_computed_key_element(
+ const axutil_env_t * env,
+ int wst_version,
+ axiom_node_t * parent_node);
+
+ /**
+ * Create BinarySecret element. This contains base64 encoded binary
secret or key.
+ * And also contain @Type attribute.
+ * @param env pointer to environment struct
+ * @param wst_version integer representing wst version
+ * @param parent_node pointer to parent axiom node
+ * @param enc_secret string representing encoded secret
+ * @param bin_sec_type Type of the binary secret
+ * @returns BinarySecret element or NULL if error occurred.
+ */
+ AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+ trust_util_create_binary_secret_element(
+ const axutil_env_t * env,
+ int wst_version,
+ axiom_node_t * parent_node,
+ axis2_char_t * enc_secret,
+ axis2_char_t * bin_sec_type);
+
+ /**
+ * Create ComputedKeyAlgorithm element.
+ * @param env pointer to environment struct
+ * @param wst_version integer representing wst version
+ * @param parent_node pointer to parent axiom node
+ * @param algo_id Algorithm identifier
+ * @returns ComputedKeyAlgorithm element or NULL if error occurred.
+ */
+ AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+ trust_util_create_computed_key_algo_element(
+ const axutil_env_t * env,
+ int wst_version,
+ axiom_node_t * parent_node,
+ axis2_char_t * algo_id);
+
+ /**
+ * Create KeySize element.
+ * @param env pointer to environment struct
+ * @param wst_version integer representing wst version
+ * @param parent_node pointer to parent axiom node
+ * @param key_size Key size string
+ * @returns KeySize element or NULL if error occurred.
+ */
+ AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+ trust_util_create_key_size_element(
+ const axutil_env_t * env,
+ int wst_version,
+ axiom_node_t * parent_node,
+ axis2_char_t * key_size);
+
+ /**
+ * Create KeyType element.
+ * @param env pointer to environment struct
+ * @param wst_version integer representing wst version
+ * @param parent_node pointer to parent axiom node
+ * @param key_type Key type string
+ * @returns KeySize element or NULL if error occurred.
+ */
+ AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+ trust_util_create_key_type_element(
+ const axutil_env_t * env,
+ int wst_version,
+ axiom_node_t * parent_node,
+ axis2_char_t * key_type);
+
+ /**
+ * Create LifeTime element.
+ *
+ * @param env pointer to environment struct
+ * @param wst_version integer representing wst version
+ * @param parent_node pointer to parent axiom node
+ * @returns LifeTime element or NULL if error occurred.
+ */
+ AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+ trust_util_create_life_time_element(
+ const axutil_env_t * env,
+ axiom_node_t * parent_node,
+ int wst_version,
+ int ttl);
+
+ /**
+ * Create RequestedAttachedReference element.
+ * @param env pointer to environment struct
+ * @param wst_version integer representing wst version
+ * @param parent_node pointer to parent axiom node
+ * @returns RequestedAttachedReference element or NULL if error occurred.
+ */
+ AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+ trust_util_create_req_attached_reference_element(
+ const axutil_env_t * env,
+ int wst_version,
+ axiom_node_t * parent_node);
+
+ /**
+ * Create RequestedUnAttachedReference element.
+ * @param env pointer to environment struct
+ * @param wst_version integer representing wst version
+ * @param parent_node pointer to parent axiom node
+ * @returns RequestedUnAttachedReference element or NULL if error occurred.
+ */
+ AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+ trust_util_create_req_unattached_reference_element(
+ const axutil_env_t * env,
+ const int version,
+ axiom_node_t * parent_node);
+
+ /**
+ * Create EncryptedData element.
+ * @param env pointer to environment struct
+ * @param wst_version integer representing wst version
+ * @param parent_node pointer to parent axiom node
+ * @param enc_data encrypted data string
+ * @returns EncryptedData element or NULL if error occurred.
+ */
+ AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+ trust_util_create_encrypted_data_element(
+ const axutil_env_t * env,
+ int wst_version,
+ axiom_node_t * parent_node,
+ axis2_char_t * enc_data);
+
+ /**
+ * Create RenewTarget element.
+ * @param env pointer to environment struct
+ * @param wst_version integer representing wst version
+ * @param parent_node pointer to parent axiom node
+ * @param token_renew_pending_node
+ * @returns RenewTarget element or NULL if error occurred.
+ */
+ AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+ trust_util_create_renew_traget_element(
+ const axutil_env_t * env,
+ int wst_version,
+ axiom_node_t * parent_node,
+ axiom_node_t * token_renew_pending_node);
+
+ /**
+ * Create AllowPostdating element.
+ * @param env pointer to environment struct
+ * @param wst_version integer representing wst version
+ * @param parent_node pointer to parent axiom node
+ * @returns AllowPostdating element or NULL if error occurred.
+ */
+ AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+ trust_util_create_allow_postdating_element(
+ const axutil_env_t * env,
+ int wst_version,
+ axiom_node_t * parent_node);
+
+ /**
+ * Create Renewing element.
+ * @param env pointer to environment struct
+ * @param wst_version integer representing wst version
+ * @param parent_node pointer to parent axiom node
+ * @param allow_flag
+ * @param ok_flag
+ * @returns Renewing element or NULL if error occurred.
+ */
+ AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+ trust_util_create_renewing_element(
+ const axutil_env_t * env,
+ int wst_version,
+ axiom_node_t * parent_node,
+ trust_allow_t allow_flag,
+ trust_ok_t ok_flag);
+
+ /**
+ * Create CancelTarget element.
+ * @param env pointer to environment struct
+ * @param wst_version integer representing wst version
+ * @param parent_node pointer to parent axiom node
+ * @param token_cancel_pending_node
+ * @returns CancelTarget element or NULL if error occurred.
+ */
+ AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+ trust_util_create_cancel_target_element(
+ const axutil_env_t * env,
+ int wst_version,
+ axiom_node_t * parent_node,
+ axiom_node_t * token_cancel_pending_node);
+
+ /**
+ * Create Status element for validation response.
+ * @param env pointer to environment struct
+ * @param wst_version integer representing wst version
+ * @param parent_node pointer to parent axiom node
+ * @param token_cancel_pending_node
+ * @returns Status element or NULL if error occurred.
+ */
+ AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+ trust_util_create_validation_response_element(
+ const axutil_env_t * env,
+ axiom_node_t * parent_node,
+ int wst_version,
+ axis2_char_t * code,
+ axis2_char_t * reason);
+
+ /**
+ * Returns the namespace uri of WST according to the version.
+ * @param env pointer to environment struct
+ * @param wst_version integer representing wst version
+ * @returns namespace uri according to version.
+ */
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ trust_util_get_wst_ns(
+ const axutil_env_t * env,
+ int wst_version);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /*TRUST_UTIL_H */