You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ka...@apache.org on 2007/02/14 07:20:09 UTC
svn commit: r507411 [1/3] - in /webservices/axis2/trunk/c/rampart: include/
src/core/ src/handlers/ src/secpolicy/builder/ src/secpolicy/model/
src/secpolicy/test-resources/ src/util/
Author: kaushalye
Date: Tue Feb 13 22:20:06 2007
New Revision: 507411
URL: http://svn.apache.org/viewvc?view=rev&rev=507411
Log:
Integrating security policy with Rampart/C
------------------------------------------
This is a major change in the configurations in Rampart/C. Now the configurations are based on WS-Security Policy specification 1.1 -July 2005. There are samples available under rampart/samples/secpolicy. These samples are to cover all the scenarios that Rampart/C is supporting up to now.
Added:
webservices/axis2/trunk/c/rampart/include/rampart_context.h (with props)
webservices/axis2/trunk/c/rampart/include/rampart_engine.h (with props)
webservices/axis2/trunk/c/rampart/src/util/rampart_context.c
webservices/axis2/trunk/c/rampart/src/util/rampart_engine.c
Modified:
webservices/axis2/trunk/c/rampart/include/oxs_constants.h
webservices/axis2/trunk/c/rampart/include/rampart_constants.h
webservices/axis2/trunk/c/rampart/include/rampart_encryption.h
webservices/axis2/trunk/c/rampart/include/rampart_handler_util.h
webservices/axis2/trunk/c/rampart/include/rampart_sec_header_builder.h
webservices/axis2/trunk/c/rampart/include/rampart_sec_header_processor.h
webservices/axis2/trunk/c/rampart/include/rampart_timestamp_token.h
webservices/axis2/trunk/c/rampart/include/rampart_username_token.h
webservices/axis2/trunk/c/rampart/include/rampart_util.h
webservices/axis2/trunk/c/rampart/include/rp_defines.h
webservices/axis2/trunk/c/rampart/include/rp_includes.h
webservices/axis2/trunk/c/rampart/include/rp_layout.h
webservices/axis2/trunk/c/rampart/include/rp_rampart_config.h
webservices/axis2/trunk/c/rampart/include/rp_secpolicy.h
webservices/axis2/trunk/c/rampart/src/core/Makefile.am
webservices/axis2/trunk/c/rampart/src/handlers/rampart_in_handler.c
webservices/axis2/trunk/c/rampart/src/handlers/rampart_out_handler.c
webservices/axis2/trunk/c/rampart/src/secpolicy/builder/algorithmsuite_builder.c
webservices/axis2/trunk/c/rampart/src/secpolicy/builder/asymmetric_binding_builder.c
webservices/axis2/trunk/c/rampart/src/secpolicy/builder/binding_commons_builder.c
webservices/axis2/trunk/c/rampart/src/secpolicy/builder/encryption_crypto_builder.c
webservices/axis2/trunk/c/rampart/src/secpolicy/builder/https_token_builder.c
webservices/axis2/trunk/c/rampart/src/secpolicy/builder/layout_builder.c
webservices/axis2/trunk/c/rampart/src/secpolicy/builder/policy_creator.c
webservices/axis2/trunk/c/rampart/src/secpolicy/builder/rampart_config_builder.c
webservices/axis2/trunk/c/rampart/src/secpolicy/builder/secpolicy_builder.c
webservices/axis2/trunk/c/rampart/src/secpolicy/builder/security_context_token_builder.c
webservices/axis2/trunk/c/rampart/src/secpolicy/builder/signature_crypto_builder.c
webservices/axis2/trunk/c/rampart/src/secpolicy/builder/signed_encrypted_parts_builder.c
webservices/axis2/trunk/c/rampart/src/secpolicy/builder/supporting_tokens_builder.c
webservices/axis2/trunk/c/rampart/src/secpolicy/builder/symmetric_asymmetric_commons_builder.c
webservices/axis2/trunk/c/rampart/src/secpolicy/builder/symmetric_binding_builder.c
webservices/axis2/trunk/c/rampart/src/secpolicy/builder/token_builder.c
webservices/axis2/trunk/c/rampart/src/secpolicy/builder/transport_binding_builder.c
webservices/axis2/trunk/c/rampart/src/secpolicy/builder/username_token_builder.c
webservices/axis2/trunk/c/rampart/src/secpolicy/builder/wss10_builder.c
webservices/axis2/trunk/c/rampart/src/secpolicy/builder/wss11_builder.c
webservices/axis2/trunk/c/rampart/src/secpolicy/builder/x509_token_builder.c
webservices/axis2/trunk/c/rampart/src/secpolicy/model/asymmetric_binding.c
webservices/axis2/trunk/c/rampart/src/secpolicy/model/header.c
webservices/axis2/trunk/c/rampart/src/secpolicy/model/https_token.c
webservices/axis2/trunk/c/rampart/src/secpolicy/model/layout.c
webservices/axis2/trunk/c/rampart/src/secpolicy/model/rampart_config.c
webservices/axis2/trunk/c/rampart/src/secpolicy/model/ut.c
webservices/axis2/trunk/c/rampart/src/secpolicy/model/wss10.c
webservices/axis2/trunk/c/rampart/src/secpolicy/model/wss11.c
webservices/axis2/trunk/c/rampart/src/secpolicy/model/x509_token.c
webservices/axis2/trunk/c/rampart/src/secpolicy/test-resources/2.xml
webservices/axis2/trunk/c/rampart/src/util/Makefile.am
webservices/axis2/trunk/c/rampart/src/util/rampart_encryption.c
webservices/axis2/trunk/c/rampart/src/util/rampart_handler_util.c
webservices/axis2/trunk/c/rampart/src/util/rampart_sec_header_builder.c
webservices/axis2/trunk/c/rampart/src/util/rampart_sec_header_processor.c
webservices/axis2/trunk/c/rampart/src/util/rampart_util.c
webservices/axis2/trunk/c/rampart/src/util/timestamp_token.c
webservices/axis2/trunk/c/rampart/src/util/username_token.c
Modified: webservices/axis2/trunk/c/rampart/include/oxs_constants.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/include/oxs_constants.h?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/include/oxs_constants.h (original)
+++ webservices/axis2/trunk/c/rampart/include/oxs_constants.h Tue Feb 13 22:20:06 2007
@@ -322,7 +322,10 @@
#define OXS_STR_KEY_IDENTIFIER "KeyIdentifier"
#define OXS_STR_EMBEDDED "Embedded"
#define OXS_STR_ISSUER_SERIAL "IssuerSerial"
-
+#define OXS_STR_THUMB_PRINT "ThumbPrint"
+#define OXS_STR_EXTERNAL_URI "ExternalUri"
+#define OXS_STR_ENCRYPTED_KEY "Encryptedkey"
+
/*************************************************************************/
Modified: webservices/axis2/trunk/c/rampart/include/rampart_constants.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/include/rampart_constants.h?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/include/rampart_constants.h (original)
+++ webservices/axis2/trunk/c/rampart/include/rampart_constants.h Tue Feb 13 22:20:06 2007
@@ -24,6 +24,8 @@
* @brief Holds constants for rampart
*/
+#include <oxs_constants.h>
+
#ifdef __cplusplus
extern "C"
{
@@ -86,8 +88,14 @@
</xs:element>
</xs:schema>
*/
+/*
#define RAMPART_INFLOW_SECURITY "InflowSecurity"
#define RAMPART_OUTFLOW_SECURITY "OutflowSecurity"
+*/
+
+#define RAMPART_INFLOW_SECURITY_POLICY "InflowSecurityPolicy"
+#define RAMPART_OUTFLOW_SECURITY_POLICY "OutflowSecurityPolicy"
+
#define RAMPART_PASSWORD_TEXT "passwordText"
#define RAMPART_PASSWORD_DIGEST "passwordDigest"
#define RAMPART_ACTION "action"
@@ -157,7 +165,11 @@
#define RAMPART_STR_KEY_IDENTIFIER OXS_STR_KEY_IDENTIFIER
#define RAMPART_STR_EMBEDDED OXS_STR_EMBEDDED
#define RAMPART_STR_ISSUER_SERIAL OXS_STR_ISSUER_SERIAL
+#define RAMPART_STR_THUMB_PRINT OXS_STR_THUMB_PRINT
+#define RAMPART_STR_EXTERNAL_URI OXS_STR_EXTERNAL_URI
+#define RAMPART_STR_ENCRYPTED_KEY OXS_STR_ENCRYPTED_KEY
+
#ifdef __cplusplus
}
#endif
Added: webservices/axis2/trunk/c/rampart/include/rampart_context.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/include/rampart_context.h?view=auto&rev=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/include/rampart_context.h (added)
+++ webservices/axis2/trunk/c/rampart/include/rampart_context.h Tue Feb 13 22:20:06 2007
@@ -0,0 +1,230 @@
+/*
+ * Copyright 2004,2005 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.
+ */
+
+#ifndef RAMPART_CONTEXT_H
+#define RAMPART_CONTEXT_H
+
+/** @defgroup rampart_context
+ * @ingroup rampart_context
+ * @{
+ */
+
+#include <rp_includes.h>
+#include <rp_secpolicy.h>
+#include <rampart_authn_provider.h>
+#include <rampart_util.h>
+#include <axis2_property.h>
+#include <rampart_constants.h>
+#include <rampart_callback.h>
+#include <rampart_authn_provider.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ typedef axis2_char_t *(AXIS2_CALL*
+ pfunc)(const axis2_env_t *env,
+ const axis2_char_t *username,
+ void *param);
+
+ typedef rampart_authn_provider_status_t (AXIS2_CALL*
+ auth_password_func)(const axis2_env_t* env,
+ const axis2_char_t *username,
+ const axis2_char_t *password);
+
+ typedef rampart_authn_provider_status_t (AXIS2_CALL*
+ auth_digest_func)(const axis2_env_t* env,
+ const axis2_char_t *username,
+ const axis2_char_t *nonce,
+ const axis2_char_t *created,
+ const char *digest);
+
+ typedef struct rampart_context_t rampart_context_t;
+
+ AXIS2_EXTERN rampart_context_t *AXIS2_CALL
+ rampart_context_create(const axis2_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ rampart_context_free(rampart_context_t *rampart_context,
+ const axis2_env_t *env);
+
+ AXIS2_EXTERN rp_secpolicy_t *AXIS2_CALL
+ rampart_context_get_secpolicy(
+ rampart_context_t *rampart_context,
+ const axis2_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ rampart_context_set_secpolicy(rampart_context_t *rampart_context,
+ const axis2_env_t *env,
+ rp_secpolicy_t *secpolicy);
+
+ AXIS2_EXTERN rampart_callback_t *AXIS2_CALL
+ rampart_context_get_password_callback(
+ rampart_context_t *rampart_context,
+ const axis2_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ rampart_context_set_password_callback(rampart_context_t *rampart_context,
+ const axis2_env_t *env,
+ rampart_callback_t *password_callback_module);
+
+ AXIS2_EXTERN pfunc AXIS2_CALL
+ rampart_context_get_password_function(
+ rampart_context_t *rampart_context,
+ const axis2_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ rampart_context_set_password_function(rampart_context_t *rampart_context,
+ const axis2_env_t *env,
+ pfunc password_func);
+
+ AXIS2_EXTERN auth_password_func AXIS2_CALL
+ rampart_context_get_auth_password_function(
+ rampart_context_t *rampart_context,
+ const axis2_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ rampart_context_set_auth_password_function(rampart_context_t *rampart_context,
+ const axis2_env_t *env,
+ auth_password_func authenticate_with_password);
+
+ AXIS2_EXTERN auth_digest_func AXIS2_CALL
+ rampart_context_get_auth_digest_function(
+ rampart_context_t *rampart_context,
+ const axis2_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ rampart_context_set_auth_digest_function(rampart_context_t *rampart_context,
+ const axis2_env_t *env,
+ auth_digest_func authenticate_with_digest);
+
+ AXIS2_EXTERN rampart_authn_provider_t *AXIS2_CALL
+ rampart_context_get_authn_provider(
+ rampart_context_t *rampart_context,
+ const axis2_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ rampart_context_set_authn_provider(rampart_context_t *rampart_context,
+ const axis2_env_t *env,
+ rampart_authn_provider_t *authn_provider);
+
+ AXIS2_EXTERN int AXIS2_CALL
+ rampart_context_get_binding_type(
+ rampart_context_t *rampart_context,
+ const axis2_env_t *env);
+
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ rampart_context_is_include_timestamp(
+ rampart_context_t *rampart_context,
+ const axis2_env_t *env);
+
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ rampart_context_is_include_username_token(
+ rampart_context_t *rampart_context,
+ const axis2_env_t *env);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ rampart_context_get_user(
+ rampart_context_t *rampart_context,
+ const axis2_env_t *env);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ rampart_context_get_password_callback_class(
+ rampart_context_t *rampart_context,
+ const axis2_env_t *env);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ rampart_context_get_authn_module_name(
+ rampart_context_t *rampart_context,
+ const axis2_env_t *env);
+
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ rampart_context_get_password_type(
+ rampart_context_t *rampart_context,
+ const axis2_env_t *env);
+
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ rampart_context_is_encrypt_before_sign(
+ rampart_context_t *rampart_context,
+ const axis2_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ rampart_context_get_nodes_to_encrypt(
+ rampart_context_t *rampart_context,
+ const axis2_env_t *env,
+ axiom_soap_envelope_t *soap_envelope,
+ axis2_array_list_t *nodes_to_encrypt);
+
+ AXIS2_EXTERN rp_property_t *AXIS2_CALL
+ rampart_context_get_token(
+ rampart_context_t *rampart_context,
+ const axis2_env_t *env,
+ axis2_bool_t for_encryption,
+ axis2_bool_t server_side);
+
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ rampart_context_check_is_derived_keys(
+ const axis2_env_t *env,
+ rp_property_t *token);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ rampart_context_get_enc_sym_algo(
+ rampart_context_t *rampart_context,
+ const axis2_env_t *env);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ rampart_context_get_enc_asym_algo(
+ rampart_context_t *rampart_context,
+ const axis2_env_t *env);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ rampart_context_get_encryption_prop_file(
+ rampart_context_t *rampart_context,
+ const axis2_env_t *env);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ rampart_context_get_encryption_user(
+ rampart_context_t *rampart_context,
+ const axis2_env_t *env);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ rampart_context_get_enc_key_identifier(
+ rampart_context_t *rampart_context,
+ rp_property_t *token,
+ axis2_bool_t server_side,
+ const axis2_env_t *env);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ rampart_context_get_layout(
+ rampart_context_t *rampart_context,
+ const axis2_env_t *env);
+
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ rampart_context_get_decryption_prop_file(
+ rampart_context_t *rampart_context,
+ const axis2_env_t *env);
+
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ rampart_context_check_whether_to_encrypt(
+ rampart_context_t *rampart_context,
+ const axis2_env_t *env);
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif
Propchange: webservices/axis2/trunk/c/rampart/include/rampart_context.h
------------------------------------------------------------------------------
svn:executable = *
Modified: webservices/axis2/trunk/c/rampart/include/rampart_encryption.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/include/rampart_encryption.h?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/include/rampart_encryption.h (original)
+++ webservices/axis2/trunk/c/rampart/include/rampart_encryption.h Tue Feb 13 22:20:06 2007
@@ -22,6 +22,7 @@
#include <rampart_action.h>
#include <oxs_asym_ctx.h>
#include <oxs_xml_encryption.h>
+#include <rampart_context.h>
/**
* @file rampart_encryption.h
* @brief encrypts a SOAP message
@@ -44,7 +45,7 @@
AXIS2_EXTERN axis2_status_t AXIS2_CALL
rampart_enc_encrypt_message(const axis2_env_t *env,
axis2_msg_ctx_t *msg_ctx,
- rampart_actions_t *actions,
+ rampart_context_t *rampart_context,
axiom_soap_envelope_t *soap_envelope,
axiom_node_t *sec_node);
Added: webservices/axis2/trunk/c/rampart/include/rampart_engine.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/include/rampart_engine.h?view=auto&rev=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/include/rampart_engine.h (added)
+++ webservices/axis2/trunk/c/rampart/include/rampart_engine.h Tue Feb 13 22:20:06 2007
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2004,2005 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.
+ */
+
+#ifndef RAMPART_ENGINE_H
+#define RAMPART_ENGINE_H
+
+/** @defgroup rampart_engine
+ * @ingroup rampart_engine
+ * @{
+ */
+
+#include <rp_includes.h>
+#include <rampart_context.h>
+#include <rp_secpolicy.h>
+#include <rampart_authn_provider.h>
+#include <rampart_util.h>
+#include <axis2_property.h>
+#include <rampart_constants.h>
+#include <rampart_callback.h>
+#include <rp_policy_creator.h>
+#include <rampart_handler_util.h>
+#include <axis2_msg_ctx.h>
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ AXIS2_EXTERN rampart_context_t* AXIS2_CALL
+ rampart_engine_init(const axis2_env_t *env,
+ axis2_msg_ctx_t *msg_ctx,
+ axis2_char_t *x_flow_policy);
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif
Propchange: webservices/axis2/trunk/c/rampart/include/rampart_engine.h
------------------------------------------------------------------------------
svn:executable = *
Modified: webservices/axis2/trunk/c/rampart/include/rampart_handler_util.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/include/rampart_handler_util.h?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/include/rampart_handler_util.h (original)
+++ webservices/axis2/trunk/c/rampart/include/rampart_handler_util.h Tue Feb 13 22:20:06 2007
@@ -152,6 +152,14 @@
rampart_validate_security_token(const axis2_env_t *env,
axis2_msg_ctx_t *msg_ctx,
axiom_node_t *sec_node);
+
+
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+rampart_get_policy_location(const axis2_env_t *env,
+ axis2_msg_ctx_t *msg_ctx,
+ axis2_char_t *param_name);
+
+
/** @} */
#ifdef __cplusplus
}
Modified: webservices/axis2/trunk/c/rampart/include/rampart_sec_header_builder.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/include/rampart_sec_header_builder.h?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/include/rampart_sec_header_builder.h (original)
+++ webservices/axis2/trunk/c/rampart/include/rampart_sec_header_builder.h Tue Feb 13 22:20:06 2007
@@ -19,7 +19,7 @@
#include <axis2_env.h>
#include <axiom_soap.h>
#include <axis2_msg_ctx.h>
-#include <rampart_action.h>
+#include <rampart_context.h>
#include <oxs_asym_ctx.h>
#include <oxs_xml_encryption.h>
/**
@@ -44,7 +44,7 @@
AXIS2_EXTERN axis2_status_t AXIS2_CALL
rampart_shb_build_message(const axis2_env_t *env,
axis2_msg_ctx_t *msg_ctx,
- rampart_actions_t *actions,
+ rampart_context_t *context,
axiom_soap_envelope_t *soap_envelope);
Modified: webservices/axis2/trunk/c/rampart/include/rampart_sec_header_processor.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/include/rampart_sec_header_processor.h?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/include/rampart_sec_header_processor.h (original)
+++ webservices/axis2/trunk/c/rampart/include/rampart_sec_header_processor.h Tue Feb 13 22:20:06 2007
@@ -22,6 +22,7 @@
#include <rampart_action.h>
#include <oxs_asym_ctx.h>
#include <oxs_xml_encryption.h>
+#include <rampart_context.h>
/**
* @file rampart_sec_header_processor.h
* @brief Processes a message depending on it's security related claims
@@ -48,7 +49,8 @@
AXIS2_EXTERN axis2_status_t AXIS2_CALL
rampart_shp_process_message(const axis2_env_t *env,
axis2_msg_ctx_t *msg_ctx,
- rampart_actions_t *actions,
+ /* rampart_actions_t *actions,*/
+ rampart_context_t *rampart_context,
axiom_soap_envelope_t *soap_envelope,
axiom_node_t *sec_node);
Modified: webservices/axis2/trunk/c/rampart/include/rampart_timestamp_token.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/include/rampart_timestamp_token.h?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/include/rampart_timestamp_token.h (original)
+++ webservices/axis2/trunk/c/rampart/include/rampart_timestamp_token.h Tue Feb 13 22:20:06 2007
@@ -58,7 +58,6 @@
axis2_status_t (AXIS2_CALL *
build)(rampart_timestamp_token_t *timestamp_token,
const axis2_env_t *env,
- const axis2_ctx_t *ctx,
axiom_node_t *sec_node,
const axiom_namespace_t *sec_ns_obj,
int ttl
@@ -99,8 +98,8 @@
#define RAMPART_TIMESTAMP_TOKEN_FREE(timestamp_token, env) \
((timestamp_token)->ops->free(timestamp_token, env))
-#define RAMPART_TIMESTAMP_TOKEN_BUILD(timestamp_token, env, ctx, sec_node, sec_ns_obj, ttl) \
- ((timestamp_token)->ops->build(timestamp_token, env, ctx, sec_node, sec_ns_obj, ttl))
+#define RAMPART_TIMESTAMP_TOKEN_BUILD(timestamp_token, env, sec_node, sec_ns_obj, ttl) \
+ ((timestamp_token)->ops->build(timestamp_token, env, sec_node, sec_ns_obj, ttl))
#define RAMPART_TIMESTAMP_TOKEN_VALIDATE(timestamp_token, env, msg_ctx, ts_node) \
((timestamp_token)->ops->validate(timestamp_token, env, msg_ctx, ts_node))
Modified: webservices/axis2/trunk/c/rampart/include/rampart_username_token.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/include/rampart_username_token.h?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/include/rampart_username_token.h (original)
+++ webservices/axis2/trunk/c/rampart/include/rampart_username_token.h Tue Feb 13 22:20:06 2007
@@ -33,7 +33,7 @@
#include <rampart_constants.h>
#include <rampart_crypto_util.h>
#include <rampart_action.h>
-
+#include <rampart_context.h>
/** Type name for struct rampart_username_token_ops */
typedef struct rampart_username_token_ops rampart_username_token_ops_t;
/** Type name for struct rampart_username_token */
@@ -57,7 +57,7 @@
* @param sec_ns_obj security namespace object
* @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
*/
- axis2_status_t (AXIS2_CALL *
+/* axis2_status_t (AXIS2_CALL *
build)(rampart_username_token_t *username_token,
const axis2_env_t *env,
axis2_ctx_t *ctx,
@@ -65,7 +65,16 @@
axiom_node_t *sec_node,
axiom_namespace_t *sec_ns_obj
);
- /**
+*/
+
+ axis2_status_t (AXIS2_CALL *
+ build)(rampart_username_token_t *username_token,
+ const axis2_env_t *env,
+ rampart_context_t *rampart_context,
+ axiom_node_t *sec_node,
+ axiom_namespace_t *sec_ns_obj
+ );
+ /*
* Validates the given username token
* @param env pointer to environment struct
* @param msg_ctx axis2 message context
@@ -77,8 +86,8 @@
validate)(rampart_username_token_t *username_token,
const axis2_env_t *env,
axis2_msg_ctx_t *msg_ctx,
- axiom_soap_header_t *soap_header,
- rampart_actions_t *actions
+ axiom_node_t *ut_node,
+ rampart_context_t *rampart_context
);
};
@@ -103,12 +112,17 @@
/*************************** Function macros **********************************/
#define RAMPART_USERNAME_TOKEN_FREE(username_token, env) \
((username_token)->ops->free(username_token, env))
-
+/*
#define RAMPART_USERNAME_TOKEN_BUILD(username_token, env, ctx, actions, sec_node, sec_ns_obj) \
((username_token)->ops->build(username_token, env, ctx, actions, sec_node, sec_ns_obj))
+*/
+
+#define RAMPART_USERNAME_TOKEN_BUILD(username_token, env,rampart_context,sec_node, sec_ns_obj) \
+ ((username_token)->ops->build(username_token, env,rampart_context,sec_node, sec_ns_obj))
+
-#define RAMPART_USERNAME_TOKEN_VALIDATE(username_token, env, msg_ctx, soap_header, actions) \
- ((username_token)->ops->validate(username_token, env, msg_ctx, soap_header, actions))
+#define RAMPART_USERNAME_TOKEN_VALIDATE(username_token, env, msg_ctx, ut_node, rampart_context) \
+ ((username_token)->ops->validate(username_token, env, msg_ctx, ut_node, rampart_context))
/** @} */
#ifdef __cplusplus
Modified: webservices/axis2/trunk/c/rampart/include/rampart_util.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/include/rampart_util.h?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/include/rampart_util.h (original)
+++ webservices/axis2/trunk/c/rampart/include/rampart_util.h Tue Feb 13 22:20:06 2007
@@ -15,6 +15,7 @@
*/
+
#include <axis2_utils_defines.h>
#include <axis2_defines.h>
#include <axis2_date_time.h>
@@ -26,7 +27,7 @@
#include <rampart_callback.h>
/**
* @file rampart_util.h
- * @brief Utilities of rampart
+ * @brief Utilities of rampart
*/
#ifndef RAMPART_UTIL_H
#define RAMPART_UTIL_H
@@ -39,6 +40,8 @@
* @defgroup Rampart_Util
* @ingroup Rampart_Util
*/
+
+
/**
* Load a DLL or .SO
*/
@@ -66,11 +69,10 @@
/**
* Load authentication module
*/
-AXIS2_EXTERN void* AXIS2_CALL
+AXIS2_EXTERN rampart_authn_provider_t* AXIS2_CALL
rampart_load_auth_module(const axis2_env_t *env,
axis2_char_t *auth_module_name);
-
/**
* Call auth module
*/
@@ -85,7 +87,7 @@
axis2_msg_ctx_t *msg_ctx);
/**
- * Load the password callback module
+ * Load the password callback module
*
*/
AXIS2_EXTERN rampart_callback_t* AXIS2_CALL
@@ -93,23 +95,25 @@
axis2_char_t *callback_module_name);
/**
- *@env the environment
- *@callback_module_name the file name of the callback module (.so or .DLL)
- *@username the name of the user to get the password
- *@ctx The axis2 context
- *@return the password for the user or NULL if failed
- */
+ *@env the environment
+ *@callback_module_name the file name of the callback module (.so or .DLL)
+ *@username the name of the user to get the password
+ *@ctx The axis2 context
+ *@return the password for the user or NULL if failed
+ */
+
+
+
AXIS2_EXTERN axis2_char_t* AXIS2_CALL
rampart_callback_password(const axis2_env_t *env,
rampart_callback_t *callback_module,
- const axis2_char_t *username,
- axis2_ctx_t *ctx);
+ const axis2_char_t *username);
- /**
+/**
* Generates the nonce. Nonce is a base64 encoded random string.
- * @env the environment
+ * @env the environment
* @return generated nonce
- */
+ */
AXIS2_EXTERN axis2_char_t *AXIS2_CALL
rampart_generate_nonce(const axis2_env_t *env);
@@ -118,15 +122,15 @@
* Generates the nonce. Nonce is a base64 encoded random string.
* @param ttl Time to live. The time difference between created and expired in mili seconds.
* @return generated nonce
- **/
-AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+ **/
+AXIS2_EXTERN axis2_char_t* AXIS2_CALL
rampart_generate_time(const axis2_env_t *env, int ttl);
AXIS2_EXTERN axis2_status_t AXIS2_CALL
rampart_compare_date_time(const axis2_env_t *env, axis2_char_t *dt1, axis2_char_t *dt2);
-AXIS2_EXTERN axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
rampart_print_info(const axis2_env_t *env, axis2_char_t* info);
/* @} */
@@ -135,3 +139,5 @@
#endif
#endif /* !RAMPART_UTIL_H */
+
+
Modified: webservices/axis2/trunk/c/rampart/include/rp_defines.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/include/rp_defines.h?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/include/rp_defines.h (original)
+++ webservices/axis2/trunk/c/rampart/include/rp_defines.h Tue Feb 13 22:20:06 2007
@@ -185,6 +185,9 @@
#define RP_ENCRYPTION_USER "encryptionUser"
#define RP_PASSWORD_CALLBACK_CLASS "passwordCallbackClass"
#define RP_AUTHN_MODULE_NAME "authnModuleName"
+ #define RP_PASSWORD_TYPE "passwordType"
+ #define RP_PLAINTEXT "plainText"
+ #define RP_DIGEST "Digest"
#define RP_SIGNATURE_CRYPTO "signatureCrypto"
#define RP_SIGNATURE_PROP_FILE "signaturePropFile"
#define RP_ENCRYPTION_CRYPTO "encryptionCypto"
@@ -192,6 +195,7 @@
#define RP_DECRYPTION_PROP_FILE "decryptionPropFile"
#define RP_SP_NS "http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"
+ #define RP_SECURITY_NS "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
#define RP_RAMPART_NS "http://ws.apache.org/rampart/c/policy"
#define RP_RAMPART_PREFIX "rampc"
#define RP_SP_PREFIX "sp"
Modified: webservices/axis2/trunk/c/rampart/include/rp_includes.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/include/rp_includes.h?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/include/rp_includes.h (original)
+++ webservices/axis2/trunk/c/rampart/include/rp_includes.h Tue Feb 13 22:20:06 2007
@@ -30,8 +30,10 @@
#include <axis2_error_default.h>
#include <axis2_env.h>
#include <axiom.h>
+#include <axiom_soap.h>
#include <axis2_qname.h>
#include <rp_defines.h>
+
/**
* @file rp_includes.h
Modified: webservices/axis2/trunk/c/rampart/include/rp_layout.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/include/rp_layout.h?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/include/rp_layout.h (original)
+++ webservices/axis2/trunk/c/rampart/include/rp_layout.h Tue Feb 13 22:20:06 2007
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef RP_HEADER_H
-#define RP_HEADER_H
+#ifndef RP_LAYOUT_H
+#define RP_LAYOUT_H
/** @defgroup rp_layout
* @ingroup rp_layout
Modified: webservices/axis2/trunk/c/rampart/include/rp_rampart_config.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/include/rp_rampart_config.h?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/include/rp_rampart_config.h (original)
+++ webservices/axis2/trunk/c/rampart/include/rp_rampart_config.h Tue Feb 13 22:20:06 2007
@@ -80,6 +80,17 @@
const axis2_env_t *env,
axis2_char_t *authenticate_module);
+ AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+ rp_rampart_config_get_password_type(
+ rp_rampart_config_t *rampart_config,
+ const axis2_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ rp_rampart_config_set_password_type(rp_rampart_config_t *rampart_config,
+ const axis2_env_t *env,
+ axis2_char_t *password_type);
+
+
AXIS2_EXTERN rp_signature_crypto_t *AXIS2_CALL
rp_rampart_config_get_signature_crypto(
rp_rampart_config_t *rampart_config,
Modified: webservices/axis2/trunk/c/rampart/include/rp_secpolicy.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/include/rp_secpolicy.h?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/include/rp_secpolicy.h (original)
+++ webservices/axis2/trunk/c/rampart/include/rp_secpolicy.h Tue Feb 13 22:20:06 2007
@@ -25,10 +25,14 @@
#include <rp_includes.h>
#include <rp_property.h>
#include <rp_asymmetric_binding.h>
+#include <rp_symmetric_binding.h>
+#include <rp_transport_binding.h>
#include <rp_signed_encrypted_parts.h>
#include <rp_signed_encrypted_elements.h>
#include <rp_supporting_tokens.h>
#include <rp_rampart_config.h>
+#include <rp_wss10.h>
+#include <rp_wss11.h>
#ifdef __cplusplus
extern "C"
Modified: webservices/axis2/trunk/c/rampart/src/core/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/core/Makefile.am?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/core/Makefile.am (original)
+++ webservices/axis2/trunk/c/rampart/src/core/Makefile.am Tue Feb 13 22:20:06 2007
@@ -9,7 +9,9 @@
../util/librampart_util.la \
../omxmlsec/libomxmlsec.la \
../omxmlsec/tokens/liboxstokens.la \
- ../omxmlsec/openssl/libomopenssl.la
+ ../omxmlsec/openssl/libomopenssl.la \
+ ../secpolicy/model/librp_model.la \
+ ../secpolicy/builder/librp_builder.la
INCLUDES = -I$(top_builddir)/include \
-I ../../../include \
Modified: webservices/axis2/trunk/c/rampart/src/handlers/rampart_in_handler.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/handlers/rampart_in_handler.c?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/handlers/rampart_in_handler.c (original)
+++ webservices/axis2/trunk/c/rampart/src/handlers/rampart_in_handler.c Tue Feb 13 22:20:06 2007
@@ -33,6 +33,10 @@
#include <rampart_util.h>
#include <rampart_sec_header_processor.h>
#include <rampart_sec_processed_result.h>
+#include <rp_policy_creator.h>
+#include <rp_secpolicy_builder.h>
+#include <rampart_context.h>
+#include <rampart_engine.h>
/*************************** Function headers *********************************/
@@ -49,8 +53,6 @@
axis2_string_t *name)
{
axis2_handler_t *handler = NULL;
- AXIS2_LOG_INFO(env->log,
- "[rampart][rampart_in_handler] Created");
AXIS2_ENV_CHECK(env, NULL);
handler = axis2_handler_create(env);
if (!handler)
@@ -72,6 +74,80 @@
axiom_soap_envelope_t *soap_envelope = NULL;
axiom_soap_header_t *soap_header = NULL;
axis2_status_t status = AXIS2_FAILURE;
+ axiom_node_t *sec_node = NULL;
+ rampart_context_t *rampart_context = NULL;
+/* axis2_char_t *file_name = "/home/manjula/axis2/scratch/security-policy/c/rampart/src/secpolicy/test-resources/2.xml";*/
+/* axis2_char_t *file_name = NULL;*/
+ axis2_bool_t serverside = AXIS2_FALSE;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
+
+ serverside = axis2_msg_ctx_get_server_side(msg_ctx,env);
+/*
+ if(serverside)
+ file_name = "/home/manjula/axis2/scratch/security-policy/c/rampart/src/secpolicy/test-resources/incoming_policy.xml";
+
+ else
+ file_name = "/home/manjula/axis2/scratch/security-policy/c/deploy/client_repo/incoming_policy.xml";
+*/
+
+ soap_envelope = AXIS2_MSG_CTX_GET_SOAP_ENVELOPE(msg_ctx, env);
+ if(!soap_envelope)
+ {
+ AXIS2_LOG_INFO(env->log, "[rampart][rampart_in_handler] No SOAP envelope found. ERROR");
+ return AXIS2_FAILURE;
+ }
+
+ soap_header = AXIOM_SOAP_ENVELOPE_GET_HEADER(soap_envelope, env);
+ if (!soap_header)
+ {
+ AXIS2_LOG_INFO(env->log, "[rampart][rampart_out_handler] No SOAP header found. ERROR");
+ /*No SOAP header, so no point of proceeding*/
+ return AXIS2_SUCCESS;
+ }
+ AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "SOAP header found");
+
+ rampart_context = rampart_engine_init(env,msg_ctx,RAMPART_INFLOW_SECURITY_POLICY);
+ if(!rampart_context)
+ return AXIS2_FAILURE;
+
+ sec_node = rampart_get_security_token(env, msg_ctx, soap_header);
+
+ status = rampart_set_security_processed_results_property(env, msg_ctx);
+
+ if(AXIS2_FAILURE == status)
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "[rampart][rampart_in_handler] Unable to set the security processed results");
+ }
+ if(!sec_node)
+ {
+ AXIS2_LOG_INFO(env->log,
+ "[rampart][rampart_in_handler] No security header element.");
+ return AXIS2_SUCCESS;
+ }
+
+ status = rampart_shp_process_message(env, msg_ctx, rampart_context,
+ soap_envelope, sec_node);
+
+/*
+ rampart_context_free(rampart_context,env);
+ rampart_context = NULL;
+*/
+ return status;
+}
+
+
+/*
+axis2_status_t AXIS2_CALL
+rampart_in_handler_invoke(struct axis2_handler *handler,
+ const axis2_env_t *env,
+ struct axis2_msg_ctx *msg_ctx)
+{
+ axiom_soap_envelope_t *soap_envelope = NULL;
+ axiom_soap_header_t *soap_header = NULL;
+ axis2_status_t status = AXIS2_FAILURE;
axis2_param_t *param_in_flow_security = NULL;
axis2_ctx_t *ctx = NULL;
axis2_array_list_t *action_list = NULL;
@@ -82,21 +158,20 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
- /*Get SOAP envelope*/
soap_envelope = AXIS2_MSG_CTX_GET_SOAP_ENVELOPE(msg_ctx, env);
if (soap_envelope)
{
- /*Get SOAP header*/
+
soap_header = AXIOM_SOAP_ENVELOPE_GET_HEADER(soap_envelope, env);
if (soap_header)
{
AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "SOAP header found");
- /*Create and populate rampart actions*/
+
actions = rampart_actions_create(env);
- /*Check InFlowSecurity parameters*/
+
ctx = AXIS2_MSG_CTX_GET_BASE(msg_ctx, env);
param_in_flow_security = rampart_get_security_param(env, msg_ctx,
RAMPART_INFLOW_SECURITY);
@@ -106,7 +181,7 @@
AXIS2_LOG_INFO(env->log,
"[rampart][rampart_in_handler]Inflow Security found");
- /*Get actions*/
+
action_list = rampart_get_actions(env, ctx,
param_in_flow_security);
@@ -118,7 +193,7 @@
AXIS2_LOG_INFO(env->log,
"[rampart][rampart_in_handler] No actions defined.");
}
- /*Now we support only one action.i.e. Only the first action*/
+
param_action = (axis2_param_t*) AXIS2_ARRAY_LIST_GET(action_list,
env, 0);
@@ -136,12 +211,12 @@
"[rampart][rampart_in_handler] No Inflow Security in the paramter list.");
return AXIS2_SUCCESS;
}
- /*Then re-populate using the axis2_ctx*/
+
status = RAMPART_ACTIONS_POPULATE_FROM_CTX(actions, env, ctx);
sec_node = rampart_get_security_token(env, msg_ctx, soap_header);
- /*Set the security processed results to the message ctx*/
+
status = rampart_set_security_processed_results_property(env, msg_ctx);
if(AXIS2_FAILURE == status){
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
@@ -155,7 +230,7 @@
}
- /*The main entry point for all security header validations*/
+
status = rampart_shp_process_message(env, msg_ctx, actions,
soap_envelope, sec_node);
if (AXIS2_FAILURE == status)
@@ -163,10 +238,11 @@
return AXIS2_FAILURE;
}
+
- }else{ /* End of sec_header */
- /*It's OK to have SOAP envelopes without headers*/
+ }else{
+
return AXIS2_SUCCESS;
}
- }/* End of soap_envelope */
- return status;}
+ }
+ return status;}*/
Modified: webservices/axis2/trunk/c/rampart/src/handlers/rampart_out_handler.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/handlers/rampart_out_handler.c?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/handlers/rampart_out_handler.c (original)
+++ webservices/axis2/trunk/c/rampart/src/handlers/rampart_out_handler.c Tue Feb 13 22:20:06 2007
@@ -27,9 +27,12 @@
#include <rampart_username_token.h>
#include <rampart_handler_util.h>
#include <rampart_timestamp_token.h>
-#include <rampart_action.h>
#include <rampart_encryption.h>
#include <rampart_sec_header_builder.h>
+#include <rp_policy_creator.h>
+#include <rp_secpolicy_builder.h>
+#include <rampart_context.h>
+#include <rampart_engine.h>
/*********************** Function headers *********************************/
@@ -66,20 +69,29 @@
rampart_out_handler_invoke(struct axis2_handler * handler,
const axis2_env_t * env, axis2_msg_ctx_t * msg_ctx)
{
- axis2_ctx_t *ctx = NULL;
axiom_soap_envelope_t *soap_envelope = NULL;
axiom_soap_header_t *soap_header = NULL;
axiom_node_t *soap_header_node = NULL;
axiom_element_t *soap_header_ele = NULL;
- axis2_param_t *param_out_flow_security = NULL;
- axis2_array_list_t *action_list = NULL;
- axis2_param_t *param_action = NULL;
- rampart_actions_t *actions = NULL;
axis2_status_t status = AXIS2_FAILURE;
+ rampart_context_t *rampart_context = NULL;
+/* rp_secpolicy_t *secpolicy = NULL;*/
+/* axis2_char_t *file_name = "/home/manjula/axis2/scratch/security-policy/c/rampart/src/secpolicy/test-resources/2.xml";*/
+/* axis2_char_t *file_name = NULL;*/
+ axis2_bool_t serverside = AXIS2_FALSE;
+
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
-
+
+ serverside = axis2_msg_ctx_get_server_side(msg_ctx,env);
+/*
+ if(serverside)
+ file_name = "/home/manjula/axis2/scratch/security-policy/c/rampart/src/secpolicy/test-resources/outgoing_policy.xml";
+
+ else
+ file_name = "/home/manjula/axis2/scratch/security-policy/c/deploy/client_repo/outgoing_policy.xml";
+*/
soap_envelope = AXIS2_MSG_CTX_GET_SOAP_ENVELOPE(msg_ctx, env);
if (!soap_envelope)
{
@@ -101,71 +113,26 @@
if (soap_header)
{
soap_header_node = AXIOM_SOAP_HEADER_GET_BASE_NODE(soap_header, env);
- soap_header_ele = (axiom_element_t *)AXIOM_NODE_GET_DATA_ELEMENT(
- soap_header_node, env);
-
- /*Create and populate rampart actions*/
- actions = rampart_actions_create(env);
-
- ctx = AXIS2_MSG_CTX_GET_BASE(msg_ctx, env);
- param_out_flow_security = rampart_get_security_param(env, msg_ctx,
- RAMPART_OUTFLOW_SECURITY);
-
- if (!param_out_flow_security)
+ if(!soap_header_node)
{
- AXIS2_LOG_INFO(env->log,
- "[rampart][rampart_out_handler] No Outflow Security. So nothing to do");
+ AXIS2_LOG_INFO(env->log, "[rampart][rampart_out_handler] Cannot Create the header node");
+ /*No SOAP header, so no point of proceeding*/
return AXIS2_SUCCESS;
- }else{
-
- /*Get actions*/
- action_list = rampart_get_actions(env, ctx, param_out_flow_security);
-
-
- if (!action_list)
- {
- AXIS2_LOG_INFO(env->log,
- "[rampart][rampart_out_handler] No actions defined in outflow security");
- return AXIS2_SUCCESS;
- }
-
- if (AXIS2_ARRAY_LIST_IS_EMPTY(action_list, env))
- {
- AXIS2_LOG_INFO(env->log,
- "[rampart][rampart_out_handler] No actions defined in outflow security");
- return AXIS2_SUCCESS;
- }
-
- /*Now we support only one action.*/
- param_action = (axis2_param_t*) AXIS2_ARRAY_LIST_GET(action_list,
- env, 0);
-
- if (!param_action)
- {
- AXIS2_LOG_INFO(env->log,
- "[rampart][rampart_out_handler] Cannot find first action element ERROR");
- return AXIS2_FAILURE;
- }
-
- status = RAMPART_ACTIONS_POPULATE_FROM_PARAMS(actions, env,
- param_action);
-
}
+ soap_header_ele = (axiom_element_t *)AXIOM_NODE_GET_DATA_ELEMENT(soap_header_node,env);
-
- /*Then re-populate using the axis2_ctx.
- *This is a hack to facilitate PHP extension to pass security parameters using options
- *In future we should change this to get the param_out_flow_security from a PROPERTY if it is not available
- *in the msg_ctx as as a parameter.*/
- status = RAMPART_ACTIONS_POPULATE_FROM_CTX(actions, env, ctx);
+ rampart_context = rampart_engine_init(env,msg_ctx,RAMPART_OUTFLOW_SECURITY_POLICY);
+ if(!rampart_context)
+ return AXIS2_FAILURE;
/*We call the security header builder*/
- status = rampart_shb_build_message(env, msg_ctx, actions, soap_envelope);
+ status = rampart_shb_build_message(env, msg_ctx, rampart_context, soap_envelope);
if(AXIS2_FAILURE == status){
- AXIS2_LOG_INFO(env->log,
- "[rampart][rampart_out_handler] Security header building failed ERROR");
- return AXIS2_FAILURE;
+ AXIS2_LOG_INFO(env->log,
+ "[rampart][rampart_out_handler] Security header building failed ERROR");
}
}
- return AXIS2_SUCCESS;
+
+ return status;
+
}
Modified: webservices/axis2/trunk/c/rampart/src/secpolicy/builder/algorithmsuite_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/secpolicy/builder/algorithmsuite_builder.c?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/secpolicy/builder/algorithmsuite_builder.c (original)
+++ webservices/axis2/trunk/c/rampart/src/secpolicy/builder/algorithmsuite_builder.c Tue Feb 13 22:20:06 2007
@@ -46,9 +46,6 @@
if(algorithmsuite)
{
- algorithm_suite = rp_algorithmsuite_create(env);
- if(!algorithm_suite)
- return NULL;
policy = AXIOM_NODE_GET_FIRST_CHILD(algorithmsuite,env);
if(policy)
{
@@ -62,7 +59,11 @@
{
algosuite_string = AXIOM_ELEMENT_GET_LOCALNAME(name_ele, env);
if(algosuite_string)
- {
+ {
+ algorithm_suite = rp_algorithmsuite_create(env);
+ if(!algorithm_suite)
+ return NULL;
+
status = rp_algorithmsuite_builder_set_algosuite(name,name_ele,algosuite_string,algorithm_suite,env); if(status!=AXIS2_SUCCESS)
{
rp_algorithmsuite_free(algorithm_suite,env);
@@ -93,7 +94,6 @@
if(rp_match_secpolicy_qname(env,RP_ALGO_SUITE_BASIC256,node,element))
{
rp_algorithmsuite_set_algosuite(algorithmsuite,env,algosuite_string);
- printf("%s\n",algosuite_string);
return AXIS2_SUCCESS;
}
else
@@ -104,7 +104,6 @@
if(rp_match_secpolicy_qname(env,RP_ALGO_SUITE_BASIC192,node,element))
{
rp_algorithmsuite_set_algosuite(algorithmsuite,env,algosuite_string);
- printf("%s\n",algosuite_string);
return AXIS2_SUCCESS;
}
else
@@ -115,7 +114,6 @@
if(rp_match_secpolicy_qname(env,RP_ALGO_SUITE_BASIC128,node,element))
{
rp_algorithmsuite_set_algosuite(algorithmsuite,env,algosuite_string);
- printf("%s\n",algosuite_string);
return AXIS2_SUCCESS;
}
else
@@ -126,7 +124,6 @@
if(rp_match_secpolicy_qname(env,RP_ALGO_SUITE_TRIPLE_DES,node,element))
{
rp_algorithmsuite_set_algosuite(algorithmsuite,env,algosuite_string);
- printf("%s\n",algosuite_string);
return AXIS2_SUCCESS;
}
else
@@ -137,7 +134,6 @@
if(rp_match_secpolicy_qname(env,RP_ALGO_SUITE_BASIC256_RSA15,node,element))
{
rp_algorithmsuite_set_algosuite(algorithmsuite,env,algosuite_string);
- printf("%s\n",algosuite_string);
return AXIS2_SUCCESS;
}
else
@@ -148,7 +144,6 @@
if(rp_match_secpolicy_qname(env,RP_ALGO_SUITE_BASIC192_RSA15,node,element))
{
rp_algorithmsuite_set_algosuite(algorithmsuite,env,algosuite_string);
- printf("%s\n",algosuite_string);
return AXIS2_SUCCESS;
}
else
@@ -159,7 +154,6 @@
if(rp_match_secpolicy_qname(env,RP_ALGO_SUITE_BASIC128_RSA15,node,element))
{
rp_algorithmsuite_set_algosuite(algorithmsuite,env,algosuite_string);
- printf("%s\n",algosuite_string);
return AXIS2_SUCCESS;
}
else
@@ -170,7 +164,6 @@
if(rp_match_secpolicy_qname(env,RP_ALGO_SUITE_TRIPLE_DES_RSA15,node,element))
{
rp_algorithmsuite_set_algosuite(algorithmsuite,env,algosuite_string);
- printf("%s\n",algosuite_string);
return AXIS2_SUCCESS;
}
else
@@ -181,7 +174,6 @@
if(rp_match_secpolicy_qname(env,RP_ALGO_SUITE_BASIC256_SHA256,node,element))
{
rp_algorithmsuite_set_algosuite(algorithmsuite,env,algosuite_string);
- printf("%s\n",algosuite_string);
return AXIS2_SUCCESS;
}
else
@@ -192,7 +184,6 @@
if(rp_match_secpolicy_qname(env,RP_ALGO_SUITE_BASIC192_SHA256,node,element))
{
rp_algorithmsuite_set_algosuite(algorithmsuite,env,algosuite_string);
- printf("%s\n",algosuite_string);
return AXIS2_SUCCESS;
}
else
@@ -203,7 +194,6 @@
if(rp_match_secpolicy_qname(env,RP_ALGO_SUITE_BASIC128_SHA256,node,element))
{
rp_algorithmsuite_set_algosuite(algorithmsuite,env,algosuite_string);
- printf("%s\n",algosuite_string);
return AXIS2_SUCCESS;
}
else
@@ -214,7 +204,6 @@
if(rp_match_secpolicy_qname(env,RP_ALGO_SUITE_TRIPLE_DES_SHA256,node,element))
{
rp_algorithmsuite_set_algosuite(algorithmsuite,env,algosuite_string);
- printf("%s\n",algosuite_string);
return AXIS2_SUCCESS;
}
else
@@ -225,7 +214,6 @@
if(rp_match_secpolicy_qname(env,RP_ALGO_SUITE_BASIC256_SHA256_RSA15,node,element))
{
rp_algorithmsuite_set_algosuite(algorithmsuite,env,algosuite_string);
- printf("%s\n",algosuite_string);
return AXIS2_SUCCESS;
}
else
@@ -236,7 +224,6 @@
if(rp_match_secpolicy_qname(env,RP_ALGO_SUITE_BASIC192_SHA256_RSA15,node,element))
{
rp_algorithmsuite_set_algosuite(algorithmsuite,env,algosuite_string);
- printf("%s\n",algosuite_string);
return AXIS2_SUCCESS;
}
else
@@ -247,7 +234,6 @@
if(rp_match_secpolicy_qname(env,RP_ALGO_SUITE_BASIC128_SHA256_RSA15,node,element))
{
rp_algorithmsuite_set_algosuite(algorithmsuite,env,algosuite_string);
- printf("%s\n",algosuite_string);
return AXIS2_SUCCESS;
}
else
@@ -258,7 +244,6 @@
if(rp_match_secpolicy_qname(env,RP_ALGO_SUITE_BASIC256_RSA15,node,element))
{
rp_algorithmsuite_set_algosuite(algorithmsuite,env,algosuite_string);
- printf("%s\n",algosuite_string);
return AXIS2_SUCCESS;
}
else
@@ -269,7 +254,6 @@
if(rp_match_secpolicy_qname(env,RP_INCLUSIVE_C14N,node,element))
{
rp_algorithmsuite_set_c14n(algorithmsuite,env,algosuite_string);
- printf("%s\n",algosuite_string);
return AXIS2_SUCCESS;
}
else
@@ -280,7 +264,6 @@
if(rp_match_secpolicy_qname(env,RP_SOAP_NORMALIZATION_10,node,element))
{
rp_algorithmsuite_set_soap_normalization(algorithmsuite,env,algosuite_string);
- printf("%s\n",algosuite_string);
return AXIS2_SUCCESS;
}
else
@@ -291,7 +274,6 @@
if(rp_match_secpolicy_qname(env,RP_STR_TRANSFORM_10,node,element))
{
rp_algorithmsuite_set_str_transformation(algorithmsuite,env,algosuite_string);
- printf("%s\n",algosuite_string);
return AXIS2_SUCCESS;
}
else
@@ -302,7 +284,6 @@
if(rp_match_secpolicy_qname(env,RP_XPATH10,node,element))
{
rp_algorithmsuite_set_xpath(algorithmsuite,env,algosuite_string);
- printf("%s\n",algosuite_string);
return AXIS2_SUCCESS;
}
else
Modified: webservices/axis2/trunk/c/rampart/src/secpolicy/builder/asymmetric_binding_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/secpolicy/builder/asymmetric_binding_builder.c?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/secpolicy/builder/asymmetric_binding_builder.c (original)
+++ webservices/axis2/trunk/c/rampart/src/secpolicy/builder/asymmetric_binding_builder.c Tue Feb 13 22:20:06 2007
@@ -110,7 +110,6 @@
if(!initiator_token)
return AXIS2_FAILURE;
- printf("%s\n",local_name);
return rp_asymmetric_binding_set_initiator_token(asymmetric_binding,env,initiator_token);
}
else
@@ -125,7 +124,6 @@
if(!recipient_token)
return AXIS2_FAILURE;
- printf("%s\n",local_name);
return rp_asymmetric_binding_set_recipient_token(asymmetric_binding,env,recipient_token);
}
else
Modified: webservices/axis2/trunk/c/rampart/src/secpolicy/builder/binding_commons_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/secpolicy/builder/binding_commons_builder.c?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/secpolicy/builder/binding_commons_builder.c (original)
+++ webservices/axis2/trunk/c/rampart/src/secpolicy/builder/binding_commons_builder.c Tue Feb 13 22:20:06 2007
@@ -43,9 +43,9 @@
if(algo_suite)
{
rp_binding_commons_set_algorithmsuite(commons,env,algo_suite);
- printf("%s\n",local_name);
return AXIS2_SUCCESS;
- }
+ }
+ else return AXIS2_FAILURE;
}
return AXIS2_FAILURE;
}
@@ -58,9 +58,9 @@
if(layout)
{
rp_binding_commons_set_layout(commons,env,layout);
- printf("%s\n",local_name);
return AXIS2_SUCCESS;
- }
+ }
+ else return AXIS2_FAILURE;
}
return AXIS2_FAILURE;
}
@@ -69,7 +69,6 @@
if(rp_match_secpolicy_qname(env,RP_INCLUDE_TIMESTAMP,node,element))
{
rp_binding_commons_set_include_timestamp(commons,env,AXIS2_TRUE);
- printf("%s\n",local_name);
return AXIS2_SUCCESS;
}
return AXIS2_FAILURE;
@@ -86,7 +85,6 @@
rp_supporting_tokens_set_type(signed_supporting_tokens,env,RP_SUPPORTING_SIGNED_SUPPORTING);
- printf("%s\n",local_name);
return rp_binding_commons_set_signed_supporting_tokens(commons,env,signed_supporting_tokens);
}
else
@@ -105,7 +103,6 @@
rp_supporting_tokens_set_type(signed_endorsing_supporting_tokens,env,RP_SUPPORTING_SIGNED_ENDORSING_SUPPORTING);
- printf("%s\n",local_name);
return rp_binding_commons_set_signed_endorsing_supporting_tokens(commons,env,signed_endorsing_supporting_tokens);
}
else
@@ -123,7 +120,6 @@
rp_supporting_tokens_set_type(endorsing_supporting_tokens,env,RP_SUPPORTING_ENDORSING_SUPPORTING);
- printf("%s\n",local_name);
return rp_binding_commons_set_endorsing_supporting_tokens(commons,env,endorsing_supporting_tokens);
}
else
@@ -141,7 +137,6 @@
rp_supporting_tokens_set_type(supporting_tokens,env,RP_SUPPORTING_SUPPORTING);
- printf("%s\n",local_name);
return rp_binding_commons_set_supporting_tokens(commons,env,supporting_tokens);
}
else
Modified: webservices/axis2/trunk/c/rampart/src/secpolicy/builder/encryption_crypto_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/secpolicy/builder/encryption_crypto_builder.c?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/secpolicy/builder/encryption_crypto_builder.c (original)
+++ webservices/axis2/trunk/c/rampart/src/secpolicy/builder/encryption_crypto_builder.c Tue Feb 13 22:20:06 2007
@@ -99,8 +99,6 @@
{
axis2_char_t *encryption_prop_file = NULL;
encryption_prop_file = AXIOM_ELEMENT_GET_TEXT(element,env,node);
- printf("%s\n",local_name);
- printf("%s\n",encryption_prop_file);
return rp_encryption_crypto_set_encryption_prop_file(encryption_crypto,env,encryption_prop_file);
}
@@ -113,8 +111,6 @@
{
axis2_char_t *decryption_prop_file = NULL;
decryption_prop_file = AXIOM_ELEMENT_GET_TEXT(element,env,node);
- printf("%s\n",local_name);
- printf("%s\n",decryption_prop_file);
return rp_encryption_crypto_set_decryption_prop_file(encryption_crypto,env,decryption_prop_file);
}
Modified: webservices/axis2/trunk/c/rampart/src/secpolicy/builder/https_token_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/secpolicy/builder/https_token_builder.c?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/secpolicy/builder/https_token_builder.c (original)
+++ webservices/axis2/trunk/c/rampart/src/secpolicy/builder/https_token_builder.c Tue Feb 13 22:20:06 2007
@@ -134,7 +134,6 @@
if(value)
{
- printf("%s\n",value);
if(AXIS2_STRCMP(value,"true")==0)
return rp_https_token_set_require_client_certificate(token,env,AXIS2_TRUE);
else if(AXIS2_STRCMP(value,"false")==0)
@@ -161,7 +160,6 @@
if(rp_match_secpolicy_qname(env,RP_REQUIRE_DERIVED_KEYS,node,element))
{
rp_https_token_set_derivedkeys(https_token,env,AXIS2_TRUE);
- printf("%s\n",local_name);
return AXIS2_SUCCESS;
}
else
Modified: webservices/axis2/trunk/c/rampart/src/secpolicy/builder/layout_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/secpolicy/builder/layout_builder.c?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/secpolicy/builder/layout_builder.c (original)
+++ webservices/axis2/trunk/c/rampart/src/secpolicy/builder/layout_builder.c Tue Feb 13 22:20:06 2007
@@ -28,14 +28,12 @@
axiom_node_t *name = NULL;
axiom_element_t *name_ele = NULL;
axis2_char_t * value = NULL;
+ axis2_status_t status = AXIS2_SUCCESS;
AXIS2_ENV_CHECK(env,NULL);
if(layout)
{
- lay_out = rp_layout_create(env);
- if(!lay_out)
- return NULL;
policy = AXIOM_NODE_GET_FIRST_CHILD(layout,env);
if(policy)
{
@@ -49,7 +47,18 @@
{
value = AXIOM_ELEMENT_GET_LOCALNAME(name_ele, env);
if(value)
- rp_layout_builder_set_value(name,name_ele,value,lay_out,env);
+ {
+ lay_out = rp_layout_create(env);
+ if(!lay_out)
+ return NULL;
+
+ status = rp_layout_builder_set_value(name,name_ele,value,lay_out,env);
+ if(status!=AXIS2_SUCCESS)
+ {
+ rp_layout_free(lay_out,env);
+ layout = NULL;
+ }
+ }
}
}
}
@@ -73,7 +82,6 @@
if(rp_match_secpolicy_qname(env,RP_LAYOUT_STRICT,node,element))
{
rp_layout_set_value(layout,env,value);
- printf("%s\n",value);
return AXIS2_SUCCESS;
}
else
@@ -84,7 +92,6 @@
if(rp_match_secpolicy_qname(env,RP_LAYOUT_LAX,node,element))
{
rp_layout_set_value(layout,env,value);
- printf("%s\n",value);
return AXIS2_SUCCESS;
}
else
@@ -95,7 +102,6 @@
if(rp_match_secpolicy_qname(env,RP_LAYOUT_LAX_TIMESTAMP_FIRST,node,element))
{
rp_layout_set_value(layout,env,value);
- printf("%s\n",value);
return AXIS2_SUCCESS;
}
else
@@ -106,7 +112,6 @@
if(rp_match_secpolicy_qname(env,RP_LAYOUT_LAX_TIMESTAMP_LAST,node,element))
{
rp_layout_set_value(layout,env,value);
- printf("%s\n",value);
return AXIS2_SUCCESS;
}
else
Modified: webservices/axis2/trunk/c/rampart/src/secpolicy/builder/policy_creator.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/secpolicy/builder/policy_creator.c?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/secpolicy/builder/policy_creator.c (original)
+++ webservices/axis2/trunk/c/rampart/src/secpolicy/builder/policy_creator.c Tue Feb 13 22:20:06 2007
@@ -27,7 +27,6 @@
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_CREATING_XML_STREAM_READER,
AXIS2_FAILURE);
- printf("xml reader creation failed\n");
return NULL;
}
@@ -35,14 +34,12 @@
if(!builder)
{
AXIOM_XML_READER_FREE(reader, env);
- printf("Builder creation failed\n");
return NULL;
}
document = AXIOM_STAX_BUILDER_GET_DOCUMENT(builder, env);
if(!document)
{
AXIOM_STAX_BUILDER_FREE(builder, env);
- printf("Document creation failed\n");
return NULL;
}
@@ -60,7 +57,6 @@
root_ele = (axiom_element_t*)AXIOM_NODE_GET_DATA_ELEMENT (root, env);
if(root_ele)
{
- printf("%s\n" , AXIOM_ELEMENT_GET_LOCALNAME(root_ele, env));
}
}
else
@@ -74,7 +70,6 @@
exat_ele = (axiom_element_t*)AXIOM_NODE_GET_DATA_ELEMENT (exat_node, env);
if(exat_ele)
{
- printf("%s\n" , AXIOM_ELEMENT_GET_LOCALNAME(exat_ele, env));
}
}
else
@@ -91,14 +86,12 @@
all_ele = (axiom_element_t*)AXIOM_NODE_GET_DATA_ELEMENT (all_node, env);
if(all_ele)
{
- printf("%s\n" , AXIOM_ELEMENT_GET_LOCALNAME(all_ele, env));
secpolicy = rp_secpolicy_builder_build(env,all_node);
}
}
else
return NULL;
}
- printf("Successful\n");
return secpolicy;
}
Modified: webservices/axis2/trunk/c/rampart/src/secpolicy/builder/rampart_config_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/secpolicy/builder/rampart_config_builder.c?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/secpolicy/builder/rampart_config_builder.c (original)
+++ webservices/axis2/trunk/c/rampart/src/secpolicy/builder/rampart_config_builder.c Tue Feb 13 22:20:06 2007
@@ -95,8 +95,6 @@
{
axis2_char_t *user = NULL;
user = AXIOM_ELEMENT_GET_TEXT(element,env,node);
- printf("%s\n",local_name);
- printf("%s\n",user);
return rp_rampart_config_set_user(rampart_config,env,user);
}
@@ -109,8 +107,6 @@
{
axis2_char_t *encryption_user = NULL;
encryption_user = AXIOM_ELEMENT_GET_TEXT(element,env,node);
- printf("%s\n",local_name);
- printf("%s\n",encryption_user);
return rp_rampart_config_set_encryption_user(rampart_config,env,encryption_user);
}
else
@@ -122,8 +118,6 @@
{
axis2_char_t *password_callback_class = NULL;
password_callback_class = AXIOM_ELEMENT_GET_TEXT(element,env,node);
- printf("%s\n",local_name);
- printf("%s\n",password_callback_class);
return rp_rampart_config_set_password_callback_class(rampart_config,env,password_callback_class);
}
else
@@ -135,13 +129,23 @@
{
axis2_char_t *authenticate_module = NULL;
authenticate_module = AXIOM_ELEMENT_GET_TEXT(element,env,node);
- printf("%s\n",local_name);
- printf("%s\n",authenticate_module);
return rp_rampart_config_set_authenticate_module(rampart_config,env,authenticate_module);
}
else
return AXIS2_FAILURE;
}
+ else if(AXIS2_STRCMP(local_name,RP_PASSWORD_TYPE)==0)
+ {
+ if(rp_match_rampart_config_qname(env,RP_PASSWORD_TYPE,node,element))
+ {
+ axis2_char_t *password_type = NULL;
+ password_type = AXIOM_ELEMENT_GET_TEXT(element,env,node);
+ return rp_rampart_config_set_password_type(rampart_config,env,password_type);
+ }
+ else
+ return AXIS2_FAILURE;
+ }
+
else if(AXIS2_STRCMP(local_name,RP_SIGNATURE_CRYPTO)==0)
{
if(rp_match_rampart_config_qname(env,RP_SIGNATURE_CRYPTO,node,element))
@@ -151,7 +155,6 @@
if(!signature_crypto)
return AXIS2_FAILURE;
- printf("%s\n",local_name);
return rp_rampart_config_set_signature_crypto(rampart_config,env,signature_crypto);
}
else
@@ -166,7 +169,6 @@
if(!encryption_crypto)
return AXIS2_FAILURE;
- printf("%s\n",local_name);
return rp_rampart_config_set_encryption_crypto(rampart_config,env,encryption_crypto);
}
else
Modified: webservices/axis2/trunk/c/rampart/src/secpolicy/builder/secpolicy_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/secpolicy/builder/secpolicy_builder.c?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/secpolicy/builder/secpolicy_builder.c (original)
+++ webservices/axis2/trunk/c/rampart/src/secpolicy/builder/secpolicy_builder.c Tue Feb 13 22:20:06 2007
@@ -103,7 +103,6 @@
binding = NULL;
return AXIS2_FAILURE;
}
- printf("%s\n",local_name);
return rp_secpolicy_set_binding(secpolicy,env,binding);
}
else
@@ -132,7 +131,6 @@
binding = NULL;
return AXIS2_FAILURE;
}
- printf("%s\n",local_name);
return rp_secpolicy_set_binding(secpolicy,env,binding);
}
else
@@ -162,7 +160,6 @@
binding = NULL;
return AXIS2_FAILURE;
}
- printf("%s\n",local_name);
return rp_secpolicy_set_binding(secpolicy,env,binding);
}
else
@@ -180,7 +177,6 @@
rp_supporting_tokens_set_type(signed_supporting_tokens,env,RP_SUPPORTING_SIGNED_SUPPORTING);
- printf("%s\n",local_name);
return rp_secpolicy_set_signed_supporting_tokens(secpolicy,env,signed_supporting_tokens);
}
else
@@ -199,7 +195,6 @@
rp_supporting_tokens_set_type(signed_endorsing_supporting_tokens,env,RP_SUPPORTING_SIGNED_ENDORSING_SUPPORTING);
- printf("%s\n",local_name);
return rp_secpolicy_set_signed_endorsing_supporting_tokens(secpolicy,env,signed_endorsing_supporting_tokens);
}
else
@@ -217,7 +212,6 @@
rp_supporting_tokens_set_type(supporting_tokens,env,RP_SUPPORTING_SUPPORTING);
- printf("%s\n",local_name);
return rp_secpolicy_set_supporting_tokens(secpolicy,env,supporting_tokens);
}
else
@@ -235,7 +229,6 @@
rp_supporting_tokens_set_type(endorsing_supporting_tokens,env,RP_SUPPORTING_ENDORSING_SUPPORTING);
- printf("%s\n",local_name);
return rp_secpolicy_set_endorsing_supporting_tokens(secpolicy,env,endorsing_supporting_tokens);
}
else
@@ -252,7 +245,6 @@
rp_signed_encrypted_parts_set_signedparts(signed_parts,env,AXIS2_TRUE);
- printf("%s\n",local_name);
return rp_secpolicy_set_signed_parts(secpolicy,env,signed_parts);
}
else
@@ -270,7 +262,6 @@
rp_signed_encrypted_parts_set_signedparts(encrypted_parts,env,AXIS2_FALSE);
- printf("%s\n",local_name);
return rp_secpolicy_set_encrypted_parts(secpolicy,env,encrypted_parts);
}
else
@@ -287,7 +278,6 @@
rp_signed_encrypted_elements_set_signedelements(signed_elements,env,AXIS2_TRUE);
- printf("%s\n",local_name);
return rp_secpolicy_set_signed_elements(secpolicy,env,signed_elements);
}
else
@@ -305,7 +295,6 @@
rp_signed_encrypted_elements_set_signedelements(encrypted_elements,env,AXIS2_FALSE);
- printf("%s\n",local_name);
return rp_secpolicy_set_encrypted_elements(secpolicy,env,encrypted_elements);
}
else
@@ -335,7 +324,6 @@
wss = NULL;
return AXIS2_FAILURE;
}
- printf("%s\n",local_name);
return rp_secpolicy_set_wss(secpolicy,env,wss);
}
else
@@ -364,7 +352,6 @@
wss = NULL;
return AXIS2_FAILURE;
}
- printf("%s\n",local_name);
return rp_secpolicy_set_wss(secpolicy,env,wss);
}
else
@@ -379,7 +366,6 @@
if(!rampart_config)
return AXIS2_FAILURE;
- printf("%s\n",local_name);
return rp_secpolicy_set_rampart_config(secpolicy,env,rampart_config);
}
else
Modified: webservices/axis2/trunk/c/rampart/src/secpolicy/builder/security_context_token_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/secpolicy/builder/security_context_token_builder.c?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/secpolicy/builder/security_context_token_builder.c (original)
+++ webservices/axis2/trunk/c/rampart/src/secpolicy/builder/security_context_token_builder.c Tue Feb 13 22:20:06 2007
@@ -125,7 +125,6 @@
if(rp_match_secpolicy_qname(env,RP_REQUIRE_EXTERNAL_URI_REFERENCE,node,element))
{
rp_security_context_token_set_require_external_uri_ref(security_context_token,env,AXIS2_TRUE);
- printf("%s\n",local_name);
return AXIS2_SUCCESS;
}
else
@@ -136,7 +135,6 @@
if(rp_match_secpolicy_qname(env,RP_SC10_SECURITY_CONTEXT_TOKEN,node,element))
{
rp_security_context_token_set_sc10_security_context_token(security_context_token,env,AXIS2_TRUE);
- printf("%s\n",local_name);
return AXIS2_SUCCESS;
}
else
@@ -147,7 +145,6 @@
if(rp_match_secpolicy_qname(env,RP_REQUIRE_DERIVED_KEYS,node,element))
{
rp_security_context_token_set_derivedkeys(security_context_token,env,AXIS2_TRUE);
- printf("%s\n",local_name);
return AXIS2_SUCCESS;
}
else
Modified: webservices/axis2/trunk/c/rampart/src/secpolicy/builder/signature_crypto_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/secpolicy/builder/signature_crypto_builder.c?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/secpolicy/builder/signature_crypto_builder.c (original)
+++ webservices/axis2/trunk/c/rampart/src/secpolicy/builder/signature_crypto_builder.c Tue Feb 13 22:20:06 2007
@@ -95,8 +95,6 @@
{
axis2_char_t *signature_prop_file = NULL;
signature_prop_file = AXIOM_ELEMENT_GET_TEXT(element,env,node);
- printf("%s\n",local_name);
- printf("%s\n",signature_prop_file);
return rp_signature_crypto_set_signature_prop_file(signature_crypto,env,signature_prop_file);
}
Modified: webservices/axis2/trunk/c/rampart/src/secpolicy/builder/signed_encrypted_parts_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/secpolicy/builder/signed_encrypted_parts_builder.c?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/secpolicy/builder/signed_encrypted_parts_builder.c (original)
+++ webservices/axis2/trunk/c/rampart/src/secpolicy/builder/signed_encrypted_parts_builder.c Tue Feb 13 22:20:06 2007
@@ -99,7 +99,6 @@
if(rp_match_secpolicy_qname(env,RP_BODY,node,element))
{
rp_signed_encrypted_parts_set_body(signed_encrypted_parts,env,AXIS2_TRUE);
- printf("%s\n",local_name);
return AXIS2_SUCCESS;
}
else
Modified: webservices/axis2/trunk/c/rampart/src/secpolicy/builder/supporting_tokens_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/secpolicy/builder/supporting_tokens_builder.c?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/secpolicy/builder/supporting_tokens_builder.c (original)
+++ webservices/axis2/trunk/c/rampart/src/secpolicy/builder/supporting_tokens_builder.c Tue Feb 13 22:20:06 2007
@@ -123,7 +123,6 @@
if(!algorithmsuite)
return AXIS2_FAILURE;
- printf("%s\n",local_name);
return rp_supporting_tokens_set_algorithmsuite(supporting_tokens,env,algorithmsuite);
}
else
@@ -140,7 +139,6 @@
rp_signed_encrypted_parts_set_signedparts(signed_parts,env,AXIS2_TRUE);
- printf("%s\n",local_name);
return rp_supporting_tokens_set_signed_parts(supporting_tokens,env,signed_parts);
}
else
@@ -157,7 +155,6 @@
rp_signed_encrypted_elements_set_signedelements(signed_elements,env,AXIS2_TRUE);
- printf("%s\n",local_name);
return rp_supporting_tokens_set_signed_elements(supporting_tokens,env,signed_elements);
}
else
@@ -175,7 +172,6 @@
rp_signed_encrypted_parts_set_signedparts(encrypted_parts,env,AXIS2_FALSE);
- printf("%s\n",local_name);
return rp_supporting_tokens_set_encrypted_parts(supporting_tokens,env,encrypted_parts);
}
else
@@ -193,7 +189,6 @@
rp_signed_encrypted_elements_set_signedelements(encrypted_elements,env,AXIS2_FALSE);
- printf("%s\n",local_name);
return rp_supporting_tokens_set_encrypted_elements(supporting_tokens,env,encrypted_elements);
}
else
Modified: webservices/axis2/trunk/c/rampart/src/secpolicy/builder/symmetric_asymmetric_commons_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/secpolicy/builder/symmetric_asymmetric_commons_builder.c?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/secpolicy/builder/symmetric_asymmetric_commons_builder.c (original)
+++ webservices/axis2/trunk/c/rampart/src/secpolicy/builder/symmetric_asymmetric_commons_builder.c Tue Feb 13 22:20:06 2007
@@ -35,7 +35,6 @@
if(rp_match_secpolicy_qname(env,RP_ENCRYPT_BEFORE_SIGNING,node,element))
{
rp_symmetric_asymmetric_binding_commons_set_protection_order(as_commons,env,local_name);
- printf("%s\n",local_name);
return AXIS2_SUCCESS;
}
return AXIS2_FAILURE;
@@ -46,7 +45,6 @@
if(rp_match_secpolicy_qname(env,RP_ENCRYPT_SIGNATURE,node,element))
{
rp_symmetric_asymmetric_binding_commons_set_signature_protection(as_commons,env,AXIS2_TRUE);
- printf("%s\n",local_name);
return AXIS2_SUCCESS;
}
return AXIS2_FAILURE;
@@ -57,7 +55,6 @@
if(rp_match_secpolicy_qname(env,RP_PROTECT_TOKENS,node,element))
{
rp_symmetric_asymmetric_binding_commons_set_token_protection(as_commons,env,AXIS2_TRUE);
- printf("%s\n",local_name);
return AXIS2_SUCCESS;
}
return AXIS2_FAILURE;
@@ -68,7 +65,6 @@
if(rp_match_secpolicy_qname(env,RP_ONLY_SIGN_ENTIRE_HEADERS_AND_BODY,node,element))
{
rp_symmetric_asymmetric_binding_commons_set_entire_headers_and_body_signatures(as_commons,env,AXIS2_TRUE);
- printf("%s\n",local_name);
return AXIS2_SUCCESS;
}
return AXIS2_FAILURE;
Modified: webservices/axis2/trunk/c/rampart/src/secpolicy/builder/symmetric_binding_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/secpolicy/builder/symmetric_binding_builder.c?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/secpolicy/builder/symmetric_binding_builder.c (original)
+++ webservices/axis2/trunk/c/rampart/src/secpolicy/builder/symmetric_binding_builder.c Tue Feb 13 22:20:06 2007
@@ -111,7 +111,6 @@
if(!protection_token)
return AXIS2_FAILURE;
- printf("%s\n",local_name);
return rp_symmetric_binding_set_protection_token(symmetric_binding,env,protection_token);
}
else
@@ -126,7 +125,6 @@
if(!encryption_token)
return AXIS2_FAILURE;
- printf("%s\n",local_name);
return rp_symmetric_binding_set_encryption_token(symmetric_binding,env,encryption_token);
}
else
@@ -142,7 +140,6 @@
if(!signature_token)
return AXIS2_FAILURE;
- printf("%s\n",local_name);
return rp_symmetric_binding_set_signature_token(symmetric_binding,env,signature_token);
}
else
Modified: webservices/axis2/trunk/c/rampart/src/secpolicy/builder/token_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/secpolicy/builder/token_builder.c?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/secpolicy/builder/token_builder.c (original)
+++ webservices/axis2/trunk/c/rampart/src/secpolicy/builder/token_builder.c Tue Feb 13 22:20:06 2007
@@ -86,7 +86,6 @@
if(!username_token)
return AXIS2_FAILURE;
- printf("%s\n",value);
return rp_property_set_value(token,env,username_token,RP_TOKEN_USERNAME);
}
else
@@ -101,7 +100,6 @@
if(!x509_token)
return AXIS2_FAILURE;
- printf("%s\n",value);
return rp_property_set_value(token,env,x509_token,RP_TOKEN_X509);
}
else
@@ -116,7 +114,6 @@
if(!security_context_token)
return AXIS2_FAILURE;
- printf("%s\n",value);
return rp_property_set_value(token,env,security_context_token,RP_TOKEN_SECURITY_CONTEXT);
}
else
@@ -131,7 +128,6 @@
if(!https_token)
return AXIS2_FAILURE;
- printf("%s\n",value);
return rp_property_set_value(token,env,https_token,RP_TOKEN_HTTPS);
}
Modified: webservices/axis2/trunk/c/rampart/src/secpolicy/builder/transport_binding_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/secpolicy/builder/transport_binding_builder.c?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/secpolicy/builder/transport_binding_builder.c (original)
+++ webservices/axis2/trunk/c/rampart/src/secpolicy/builder/transport_binding_builder.c Tue Feb 13 22:20:06 2007
@@ -104,7 +104,6 @@
if(!transport_token)
return AXIS2_FAILURE;
- printf("%s\n",local_name);
return rp_transport_binding_set_transport_token(transport_binding,env,transport_token);
}
else
Modified: webservices/axis2/trunk/c/rampart/src/secpolicy/builder/username_token_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/secpolicy/builder/username_token_builder.c?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/secpolicy/builder/username_token_builder.c (original)
+++ webservices/axis2/trunk/c/rampart/src/secpolicy/builder/username_token_builder.c Tue Feb 13 22:20:06 2007
@@ -128,7 +128,6 @@
if(rp_match_secpolicy_qname(env,RP_WSS_USERNAME_TOKEN_10,node,element))
{
rp_username_token_set_useUTprofile10(username_token,env,AXIS2_TRUE);
- printf("%s\n",local_name);
return AXIS2_SUCCESS;
}
else
@@ -139,7 +138,6 @@
if(rp_match_secpolicy_qname(env,RP_WSS_USERNAME_TOKEN_11,node,element))
{
rp_username_token_set_useUTprofile11(username_token,env,AXIS2_TRUE);
- printf("%s\n",local_name);
return AXIS2_SUCCESS;
}
else
@@ -150,7 +148,6 @@
if(rp_match_secpolicy_qname(env,RP_REQUIRE_DERIVED_KEYS,node,element))
{
rp_username_token_set_derivedkeys(username_token,env,AXIS2_TRUE);
- printf("%s\n",local_name);
return AXIS2_SUCCESS;
}
else
Modified: webservices/axis2/trunk/c/rampart/src/secpolicy/builder/wss10_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/secpolicy/builder/wss10_builder.c?view=diff&rev=507411&r1=507410&r2=507411
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/secpolicy/builder/wss10_builder.c (original)
+++ webservices/axis2/trunk/c/rampart/src/secpolicy/builder/wss10_builder.c Tue Feb 13 22:20:06 2007
@@ -95,7 +95,6 @@
if(rp_match_secpolicy_qname(env,RP_MUST_SUPPORT_REF_KEY_IDENTIFIER,node,element))
{
rp_wss10_set_must_support_ref_key_identifier(wss10,env,AXIS2_TRUE);
- printf("%s\n",local_name);
return AXIS2_SUCCESS;
}
else
@@ -106,7 +105,6 @@
if(rp_match_secpolicy_qname(env,RP_MUST_SUPPORT_REF_ISSUER_SERIAL,node,element))
{
rp_wss10_set_must_support_ref_issuer_serial(wss10,env,AXIS2_TRUE);
- printf("%s\n",local_name);
return AXIS2_SUCCESS;
}
else
@@ -117,7 +115,6 @@
if(rp_match_secpolicy_qname(env,RP_MUST_SUPPORT_REF_EXTERNAL_URI,node,element))
{
rp_wss10_set_must_support_ref_external_uri(wss10,env,AXIS2_TRUE);
- printf("%s\n",local_name);
return AXIS2_SUCCESS;
}
else
@@ -128,7 +125,6 @@
if(rp_match_secpolicy_qname(env,RP_MUST_SUPPORT_REF_EMBEDDED_TOKEN,node,element))
{
rp_wss10_set_must_support_ref_embedded_token(wss10,env,AXIS2_TRUE);
- printf("%s\n",local_name);
return AXIS2_SUCCESS;
}
else
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org