Author: milinda
Date: Sun Dec 16 07:11:15 2007
New Revision: 604633
URL: http://svn.apache.org/viewvc?rev=604633&view=rev
Log:
Modified to increase the felexibility given to user
Added:
webservices/rampart/scratch/c/trust/c/include/trust_claims.h
webservices/rampart/scratch/c/trust/c/include/trust_entropy.h
webservices/rampart/scratch/c/trust/c/include/trust_life_time.h
webservices/rampart/scratch/c/trust/c/include/trust_rst.h
webservices/rampart/scratch/c/trust/c/include/trust_rstr.h
Modified:
webservices/rampart/scratch/c/trust/c/include/trust_context.h
webservices/rampart/scratch/c/trust/c/include/trust_sts_client.h
webservices/rampart/scratch/c/trust/c/include/trust_util.h
Added: webservices/rampart/scratch/c/trust/c/include/trust_claims.h
URL:
http://svn.apache.org/viewvc/webservices/rampart/scratch/c/trust/c/include/trust_claims.h?rev=604633&view=auto
==============================================================================
--- webservices/rampart/scratch/c/trust/c/include/trust_claims.h (added)
+++ webservices/rampart/scratch/c/trust/c/include/trust_claims.h Sun Dec 16
07:11:15 2007
@@ -0,0 +1,94 @@
+/*
+* 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_CLAIMS_H
+#define TRUST_CLAIMS_H
+
+#include <axutil_utils.h>
+#include <axiom.h>
+
+#include <trust_constants.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ typedef struct trust_claims trust_claims_t;
+
+ AXIS2_EXTERN trust_claims_t * AXIS2_CALL
+ trust_claims_create(
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_claims_free(
+ trust_claims_t *claims,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_claims_deserialize(
+ trust_claims_t *claims,
+ const axutil_env_t *env,
+ axiom_node_t *claims_node);
+
+ AXIS2_EXTERN axiom_node_t * AXIS2_CALL
+ trust_claims_serialize(
+ trust_claims_t *claims,
+ const axutil_env_t *env,
+ axiom_node_t *parent);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_claims_set_children(
+ trust_claims_t *claims,
+ const axutil_env_t *env,
+ axiom_children_iterator_t *children);
+
+ AXIS2_EXTERN axiom_children_iterator_t * AXIS2_CALL
+ trust_claims_get_children(
+ trust_claims_t *claims,
+ const axutil_env_t *env);
+
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_claims_set_attr_dialect(
+ trust_claims_t *claims,
+ const axutil_env_t *env,
+ axis2_char_t *dialect_attr);
+
+ AXIS2_EXTERN axis2_char_t * AXIS2_CALL
+ trust_claims_get_attr_dialect(
+ trust_claims_t *claims,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_claims_set_wst_ns_uri(
+ trust_claims_t *claims,
+ const axutil_env_t *env,
+ axis2_char_t *wst_ns_uri);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ trust_claims_get_wst_ns_uri(
+ trust_claims_t *claims,
+ const axutil_env_t *env);
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*TRUST_CLAIMS_H*/
Modified: webservices/rampart/scratch/c/trust/c/include/trust_context.h
URL:
http://svn.apache.org/viewvc/webservices/rampart/scratch/c/trust/c/include/trust_context.h?rev=604633&r1=604632&r2=604633&view=diff
==============================================================================
--- webservices/rampart/scratch/c/trust/c/include/trust_context.h (original)
+++ webservices/rampart/scratch/c/trust/c/include/trust_context.h Sun Dec 16
07:11:15 2007
@@ -34,6 +34,8 @@
#include <axis2_msg_ctx.h>
#include <axis2_addr.h>
#include <trust_constants.h>
+#include <trust_rst.h>
+#include <trust_rstr.h>
#ifdef __cplusplus
extern "C"
@@ -43,154 +45,71 @@
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);
+ trust_context_create(
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN void AXIS2_CALL
+ trust_context_free(
+ const axutil_env_t * env,
+ trust_context_t *trust_context);
+
+ /*Populate RST_CONTEXT : Often used in STS/IP side */
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);
+ trust_context_process_rst(
+ const axutil_env_t * env,
+ trust_context_t *trust_context,
+ axis2_msg_ctx_t * in_msg_ctx);
+ /*Populate RSTR_CONTEXT : Often used in Token Requestor side*/
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);
+ trust_context_process_rstr(
+ const axutil_env_t * env,
+ trust_context_t *trust_context,
+ axis2_msg_ctx_t * in_msg_ctx);
- AXIS2_EXTERN axiom_node_t * AXIS2_CALL
- trust_context_get_rst_node(
- trust_context_t * trust_context,
- const axutil_env_t * env);
+ /*Build RST Node from created RST_CONTEXT */
+ AXIS2_EXTERN axiom_node_t* AXIS2_CALL
+ trust_context_build_rst_node(
+ const axutil_env_t * env,
+ trust_context_t *trust_context);
- AXIS2_EXTERN axis2_status_t AXIS2_CALL
- trust_context_set_rst_node(
- trust_context_t * trust_context,
+ /*Build RSTR Node from created RSTR_CONTEXT */
+ AXIS2_EXTERN axiom_node_t* AXIS2_CALL
+ trust_context_build_rstr_node(
const axutil_env_t * env,
- axiom_node_t *rst_node);
+ trust_context_t *trust_context);
- 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,
+ /*Get Populated RST_CONTEXT */
+ AXIS2_EXTERN trust_rst_t* AXIS2_CALL
+ trust_context_get_rst(
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);
+ trust_context_t *trust_context);
- AXIS2_EXTERN axis2_char_t * AXIS2_CALL
- trust_context_get_appliesto_address(
- trust_context_t *trust_context,
- const axutil_env_t *env);
+ /*Get Populated RSTR_CONTEXT */
+ AXIS2_EXTERN trust_rstr_t* AXIS2_CALL
+ trust_context_get_rstr(
+ const axutil_env_t * env,
+ trust_context_t *trust_context);
- 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(
+ /*Set RST_CONTEXT */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_context_set_rst(
+ const axutil_env_t * env,
trust_context_t *trust_context,
- const axutil_env_t *env);
+ trust_rst_t *rst);
- 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(
+ /*Set RSTR_CONTEXT */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_context_set_rstr(
+ const axutil_env_t * env,
trust_context_t *trust_context,
- const axutil_env_t *env);
+ trust_rstr_t *rstr);
- 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
Added: webservices/rampart/scratch/c/trust/c/include/trust_entropy.h
URL:
http://svn.apache.org/viewvc/webservices/rampart/scratch/c/trust/c/include/trust_entropy.h?rev=604633&view=auto
==============================================================================
--- webservices/rampart/scratch/c/trust/c/include/trust_entropy.h (added)
+++ webservices/rampart/scratch/c/trust/c/include/trust_entropy.h Sun Dec 16
07:11:15 2007
@@ -0,0 +1,114 @@
+/*
+* 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_ENTROPY_H
+#define TRUST_ENTROPY_H
+
+#include <axutil_utils.h>
+#include <axutil_utils.h>
+#include <axutil_string.h>
+#include <axutil_base64.h>
+#include <axiom_soap.h>
+#include <axiom.h>
+#include <trust_constants.h>
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ #define BIN_SEC_ASSYM
"http://schemas.xmlsoap.org/ws/2005/02/trust/AsymmetricKey"
+ #define BIN_SEC_SYM
"http://schemas.xmlsoap.org/ws/2005/02/trust/SymmetricKey"
+ #define BIN_SEC_NONCE
"http://schemas.xmlsoap.org/ws/2005/02/trust/Nonce"
+
+ typedef enum
+ {
+ BIN_SEC_TYPE_ERROR = -1,
+ ASYMMETRIC ,
+ SYMMETRIC,
+ NONCE
+ }trust_bin_sec_type_t;
+
+ typedef struct trust_entropy trust_entropy_t;
+
+ #define TRUST_BIN_SEC_TYPE_ATTR "Type"
+
+ AXIS2_EXTERN trust_entropy_t * AXIS2_CALL
+ trust_entropy_create(
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_entropy_free(
+ trust_entropy_t *entropy,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_entropy_deserialize(
+ trust_entropy_t *entropy,
+ const axutil_env_t *env,
+ axiom_node_t *entropy_node);
+
+ AXIS2_EXTERN axiom_node_t * AXIS2_CALL
+ trust_entropy_serialize(
+ trust_entropy_t *entropy,
+ const axutil_env_t *env,
+ axiom_node_t *parent);
+
+ AXIS2_EXTERN axis2_char_t * AXIS2_CALL
+ trust_entropy_get_binary_secret(
+ trust_entropy_t *entropy,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_char_t * AXIS2_CALL
+ trust_entropy_get_str_for_bin_sec_type(
+ trust_bin_sec_type_t type,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_entropy_set_binary_secret(
+ trust_entropy_t *entropy,
+ const axutil_env_t *env,
+ axis2_char_t *bin_sec);
+
+ AXIS2_EXTERN axiom_node_t * AXIS2_CALL
+ trust_entropy_get_other(
+ trust_entropy_t *entropy,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_entropy_set_other(
+ trust_entropy_t *entropy,
+ const axutil_env_t *env,
+ axiom_node_t *other_node);
+
+ AXIS2_EXTERN axis2_char_t * AXIS2_CALL
+ trust_entropy_get_ns_uri(
+ trust_entropy_t *entropy,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_entropy_set_ns_uri(
+ trust_entropy_t *entropy,
+ const axutil_env_t *env,
+ axis2_char_t *ns_uri);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TRUST_ENTROPY_H */
Added: webservices/rampart/scratch/c/trust/c/include/trust_life_time.h
URL:
http://svn.apache.org/viewvc/webservices/rampart/scratch/c/trust/c/include/trust_life_time.h?rev=604633&view=auto
==============================================================================
--- webservices/rampart/scratch/c/trust/c/include/trust_life_time.h (added)
+++ webservices/rampart/scratch/c/trust/c/include/trust_life_time.h Sun Dec 16
07:11:15 2007
@@ -0,0 +1,112 @@
+/*
+ * 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_LIFETIME_H
+#define TRUST_LIFETIME_H
+
+#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_life_time trust_life_time_t;
+
+ AXIS2_EXTERN trust_life_time_t * AXIS2_CALL
+ trust_life_time_create(
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_life_time_free(
+ trust_life_time_t *life_time,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_life_time_deserialize(
+ trust_life_time_t *life_time,
+ const axutil_env_t *env,
+ axiom_node_t *life_time_node);
+
+ AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+ trust_life_time_serialize(
+ trust_life_time_t *life_time,
+ const axutil_env_t *env,
+ axiom_node_t *parent);
+
+ AXIS2_EXTERN int AXIS2_CALL
+ trust_life_time_get_ttl(
+ trust_life_time_t *life_time,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_life_time_set_ttl(
+ trust_life_time_t *life_time,
+ const axutil_env_t *env,
+ int ttl);
+
+ AXIS2_EXTERN axutil_date_time_t * AXIS2_CALL
+ trust_life_time_get_created(
+ trust_life_time_t *life_time,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_life_time_set_created(
+ trust_life_time_t *life_time,
+ const axutil_env_t *env,
+ axutil_date_time_t *created);
+
+ AXIS2_EXTERN axutil_date_time_t * AXIS2_CALL
+ trust_life_time_get_expires(
+ trust_life_time_t *life_time,
+ const axutil_env_t *env);
+
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_life_time_set_expires(
+ trust_life_time_t *life_time,
+ const axutil_env_t *env,
+ axutil_date_time_t *expires);
+
+
+ AXIS2_EXTERN axis2_char_t * AXIS2_CALL
+ trust_life_time_get_ns_uri(
+ trust_life_time_t *life_time,
+ const axutil_env_t *env);
+
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_life_time_set_ns_uri(
+ trust_life_time_t *life_time,
+ const axutil_env_t *env,
+ axis2_char_t *ns_uri);
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif
Added: webservices/rampart/scratch/c/trust/c/include/trust_rst.h
URL:
http://svn.apache.org/viewvc/webservices/rampart/scratch/c/trust/c/include/trust_rst.h?rev=604633&view=auto
==============================================================================
--- webservices/rampart/scratch/c/trust/c/include/trust_rst.h (added)
+++ webservices/rampart/scratch/c/trust/c/include/trust_rst.h Sun Dec 16
07:11:15 2007
@@ -0,0 +1,198 @@
+/*
+ * 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_RST_H
+#define TRUST_RST_H
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <axutil_utils.h>
+#include <axutil_base64.h>
+#include <axiom_soap.h>
+#include <axiom.h>
+#include <trust_constants.h>
+#include <trust_entropy.h>
+#include <trust_claims.h>
+#include <trust_life_time.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ typedef struct trust_rst trust_rst_t;
+
+ /* Create RST Context*/
+ AXIS2_EXTERN trust_rst_t * AXIS2_CALL
+ trust_rst_create(
+ int trust_version,
+ const axutil_env_t *env);
+
+ /* Populate RST Context from axiom_node*/
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_rst_populate_rst(
+ trust_rst_t *rst,
+ const axutil_env_t *env,
+ axiom_node_t *rst_node
+ /*axis2_msg_ctx_t *in_msg_ctx*/);
+
+ /*Build RST message from the created RST Context */
+ AXIS2_EXTERN axiom_node_t * AXIS2_CALL
+ trust_rst_build_rst(
+ trust_rst_t *rst,
+ const axutil_env_t *env,
+ axiom_node_t *parent);
+
+ /* Getters & Setters */
+
+ AXIS2_EXTERN axis2_char_t * AXIS2_CALL
+ trust_rst_get_attr_context(
+ trust_rst_t *rst,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_rst_set_attr_context(
+ trust_rst_t *rst,
+ const axutil_env_t *env,
+ axis2_char_t *attr_context);
+
+
+ AXIS2_EXTERN axis2_char_t * AXIS2_CALL
+ trust_rst_get_token_type(
+ trust_rst_t *rst,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_rst_set_token_type(
+ trust_rst_t *rst,
+ const axutil_env_t *env,
+ axis2_char_t *token_type);
+
+
+ AXIS2_EXTERN axis2_char_t * AXIS2_CALL
+ trust_rst_get_request_type(
+ trust_rst_t *rst,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_rst_set_request_type(
+ trust_rst_t *rst,
+ const axutil_env_t *env,
+ axis2_char_t *request_type);
+
+
+ AXIS2_EXTERN axis2_char_t * AXIS2_CALL
+ trust_rst_get_applies_to_addr(
+ trust_rst_t *rst,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_rst_set_appliesto(
+ trust_rst_t *rst,
+ const axutil_env_t *env,
+ axis2_char_t *applies_to_addr);
+
+
+ AXIS2_EXTERN trust_claims_t * AXIS2_CALL
+ trust_rst_get_claims(
+ trust_rst_t *rst,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_rst_set_claims(
+ trust_rst_t *rst,
+ const axutil_env_t *env,
+ trust_claims_t *claims);
+
+ AXIS2_EXTERN trust_entropy_t * AXIS2_CALL
+ trust_rst_get_entropy(
+ trust_rst_t *rst,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_rst_set_entropy(
+ trust_rst_t *rst,
+ const axutil_env_t *env,
+ trust_entropy_t *entropy);
+
+
+ AXIS2_EXTERN trust_life_time_t * AXIS2_CALL
+ trust_rst_get_life_time(
+ trust_rst_t *rst,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_rst_set_life_time(
+ trust_rst_t *rst,
+ const axutil_env_t *env,
+ trust_life_time_t *life_time);
+
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_rst_set_key_type(
+ trust_rst_t *rst,
+ const axutil_env_t *env,
+ axis2_char_t *key_type);
+
+ AXIS2_EXTERN axis2_char_t * AXIS2_CALL
+ trust_rst_get_key_type(
+ trust_rst_t *rst,
+ const axutil_env_t *env);
+
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_rst_set_key_size(
+ trust_rst_t *rst,
+ const axutil_env_t *env,
+ int key_size);
+
+ AXIS2_EXTERN int AXIS2_CALL
+ trust_rst_get_key_size(
+ trust_rst_t *rst,
+ const axutil_env_t *env);
+
+
+
+
+ /*Trust Version 1 -2005/02 - http://schemas.xmlsoap.org/ws/2005/02/trust */
+ /*Trust Version 2 -2005/12 -
http://docs.oasis-open.org/ws-sx/ws-trust/200512 */
+ AXIS2_EXTERN axis2_char_t * AXIS2_CALL
+ trust_rst_get_wst_ns_uri(
+ trust_rst_t *rst,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_rst_set_wst_ns_uri(
+ trust_rst_t *rst,
+ const axutil_env_t *env,
+ axis2_char_t *wst_ns_uri);
+
+
+
+
+ AXIS2_EXTERN void AXIS2_CALL
+ trust_rst_free(
+ trust_rst_t *rst,
+ const axutil_env_t *env);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
Added: webservices/rampart/scratch/c/trust/c/include/trust_rstr.h
URL:
http://svn.apache.org/viewvc/webservices/rampart/scratch/c/trust/c/include/trust_rstr.h?rev=604633&view=auto
==============================================================================
--- webservices/rampart/scratch/c/trust/c/include/trust_rstr.h (added)
+++ webservices/rampart/scratch/c/trust/c/include/trust_rstr.h Sun Dec 16
07:11:15 2007
@@ -0,0 +1,179 @@
+
+/*
+ * 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_RSTR_H
+#define TRUST_RSTR_H
+
+#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 <trust_constants.h>
+#include <trust_entropy.h>
+#include <trust_life_time.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ typedef struct trust_rstr trust_rstr_t;
+
+ AXIS2_EXTERN trust_rstr_t * AXIS2_CALL
+ trust_rstr_create(
+ int trust_version,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_rstr_free(
+ trust_rstr_t *rstr,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_rstr_populate_rstr(
+ trust_rstr_t *rstr,
+ const axutil_env_t *env,
+ axiom_node_t *rstr_node);
+
+ AXIS2_EXTERN axiom_node_t * AXIS2_CALL
+ trust_rstr_build_rstr(
+ trust_rstr_t *rstr,
+ const axutil_env_t *env,
+ axiom_node_t *parent);
+
+ AXIS2_EXTERN axis2_char_t * AXIS2_CALL
+ trust_rstr_get_token_type(
+ trust_rstr_t *rstr,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_rstr_set_token_type(
+ trust_rstr_t *rstr,
+ const axutil_env_t *env,
+ axis2_char_t *token_type);
+
+
+ AXIS2_EXTERN axis2_char_t * AXIS2_CALL
+ trust_rstr_get_request_type(
+ trust_rstr_t *rstr,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_rstr_set_request_type(
+ trust_rstr_t *rstr,
+ const axutil_env_t *env,
+ axis2_char_t *request_type);
+
+ AXIS2_EXTERN axiom_node_t * AXIS2_CALL
+ trust_rstr_get_requested_security_token(
+ trust_rstr_t *rstr,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_rstr_set_requested_security_token(
+ trust_rstr_t *rstr,
+ const axutil_env_t *env,
+ axiom_node_t *security_token);
+
+ AXIS2_EXTERN axis2_char_t * AXIS2_CALL
+ trust_rstr_get_applies_to(
+ trust_rstr_t *rstr,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_rstr_set_applies_to(
+ trust_rstr_t *rstr,
+ const axutil_env_t *env,
+ axis2_char_t *applies_to);
+
+ AXIS2_EXTERN axiom_node_t * AXIS2_CALL
+ trust_rstr_get_requested_attached_reference(
+ trust_rstr_t *rstr,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_rstr_set_requested_attached_reference(
+ trust_rstr_t *rstr,
+ const axutil_env_t *env,
+ axiom_node_t *ref_node);
+
+ AXIS2_EXTERN axiom_node_t * AXIS2_CALL
+ trust_rstr_get_requested_unattached_reference(
+ trust_rstr_t *rstr,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_rstr_set_requested_unattached_reference(
+ trust_rstr_t *rstr,
+ const axutil_env_t *env,
+ axiom_node_t *ref_node);
+
+ AXIS2_EXTERN axiom_node_t * AXIS2_CALL
+ trust_rstr_get_requested_proof_token(
+ trust_rstr_t *rstr,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_rstr_set_requested_proof_token(
+ trust_rstr_t *rstr,
+ const axutil_env_t *env,
+ axiom_node_t *proof_token);
+
+ AXIS2_EXTERN trust_entropy_t * AXIS2_CALL
+ trust_rstr_get_entropy(
+ trust_rstr_t *rstr,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_rstr_set_entropy(
+ trust_rstr_t *rstr,
+ const axutil_env_t *env,
+ trust_entropy_t *entropy);
+
+ AXIS2_EXTERN trust_life_time_t* AXIS2_CALL
+ trust_rstr_get_life_time(
+ trust_rstr_t *rstr,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_rstr_set_life_time(
+ trust_rstr_t *rstr,
+ const axutil_env_t *env,
+ trust_life_time_t *life_time);
+
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ trust_rstr_get_in_header(
+ trust_rstr_t *rstr,
+ const axutil_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ trust_rstr_set_in_header(
+ trust_rstr_t *rstr,
+ const axutil_env_t *env,
+ axis2_bool_t in_header);
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Modified: webservices/rampart/scratch/c/trust/c/include/trust_sts_client.h
URL:
http://svn.apache.org/viewvc/webservices/rampart/scratch/c/trust/c/include/trust_sts_client.h?rev=604633&r1=604632&r2=604633&view=diff
==============================================================================
--- webservices/rampart/scratch/c/trust/c/include/trust_sts_client.h (original)
+++ webservices/rampart/scratch/c/trust/c/include/trust_sts_client.h Sun Dec 16
07:11:15 2007
@@ -39,6 +39,10 @@
#include <trust_policy_util.h>
#include <trust_token.h>
+#include <trust_rst.h>
+#include <trust_rstr.h>
+#include <trust_context.h>
+
#ifdef __cplusplus
extern "C"
{
@@ -55,45 +59,14 @@
trust_sts_client_t * sts_client,
const axutil_env_t * env);
+
+ /*Send RST to the specified STS/IP. RST Node that is built from
RST_Context should be passed*/
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);
+ trust_context_t *trust_context);
- 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(
@@ -102,33 +75,14 @@
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
}
Modified: webservices/rampart/scratch/c/trust/c/include/trust_util.h
URL:
http://svn.apache.org/viewvc/webservices/rampart/scratch/c/trust/c/include/trust_util.h?rev=604633&r1=604632&r2=604633&view=diff
==============================================================================
--- webservices/rampart/scratch/c/trust/c/include/trust_util.h (original)
+++ webservices/rampart/scratch/c/trust/c/include/trust_util.h Sun Dec 16
07:11:15 2007
@@ -178,7 +178,9 @@
trust_util_create_requested_security_token_element(
const axutil_env_t * env,
int wst_version,
- axiom_node_t * parent_node);
+ axiom_node_t * parent_node,
+ axiom_node_t * sec_token_node);
+
/**
* Create the RequestedProofToken Element for Issuance binding.