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 ma...@apache.org on 2007/04/24 09:52:28 UTC
svn commit: r531810 - in /webservices/axis2/scratch/c/neethi/axis2c/neethi:
include/rp_builders.h include/rp_https_token_builder.h
src/assertion_builder.c src/secpolicy/builder/Makefile.am
src/secpolicy/builder/https_token_builder.c
Author: manjula
Date: Tue Apr 24 00:52:27 2007
New Revision: 531810
URL: http://svn.apache.org/viewvc?view=rev&rev=531810
Log:
Adding Https_token builder.
Added:
webservices/axis2/scratch/c/neethi/axis2c/neethi/include/rp_https_token_builder.h
webservices/axis2/scratch/c/neethi/axis2c/neethi/src/secpolicy/builder/https_token_builder.c
Modified:
webservices/axis2/scratch/c/neethi/axis2c/neethi/include/rp_builders.h
webservices/axis2/scratch/c/neethi/axis2c/neethi/src/assertion_builder.c
webservices/axis2/scratch/c/neethi/axis2c/neethi/src/secpolicy/builder/Makefile.am
Modified: webservices/axis2/scratch/c/neethi/axis2c/neethi/include/rp_builders.h
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/neethi/include/rp_builders.h?view=diff&rev=531810&r1=531809&r2=531810
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/neethi/include/rp_builders.h (original)
+++ webservices/axis2/scratch/c/neethi/axis2c/neethi/include/rp_builders.h Tue Apr 24 00:52:27 2007
@@ -28,7 +28,7 @@
#include <rp_username_token_builder.h>
#include <rp_wss10_builder.h>
#include <rp_qname_matcher.h>
-
+#include <rp_https_token_builder.h>
/**
* @file rp_builders.h
* @all the secpolicy builders
Added: webservices/axis2/scratch/c/neethi/axis2c/neethi/include/rp_https_token_builder.h
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/neethi/include/rp_https_token_builder.h?view=auto&rev=531810
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/neethi/include/rp_https_token_builder.h (added)
+++ webservices/axis2/scratch/c/neethi/axis2c/neethi/include/rp_https_token_builder.h Tue Apr 24 00:52:27 2007
@@ -0,0 +1,44 @@
+/*
+ * 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 RP_HTTPS_TOKEN_BUILDER_H
+#define RP_HTTPS_TOKEN_BUILDER_H
+
+/** @defgroup rp_https_token_builder
+ * @ingroup rp_https_token_builder
+ * @{
+ */
+
+#include <rp_includes.h>
+#include <rp_property.h>
+#include <rp_https_token.h>
+#include <neethi_assertion.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ AXIS2_EXTERN neethi_assertion_t *AXIS2_CALL
+ rp_https_token_builder_build(
+ const axutil_env_t *env,
+ axiom_node_t *node,
+ axiom_element_t *element);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
Modified: webservices/axis2/scratch/c/neethi/axis2c/neethi/src/assertion_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/neethi/src/assertion_builder.c?view=diff&rev=531810&r1=531809&r2=531810
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/neethi/src/assertion_builder.c (original)
+++ webservices/axis2/scratch/c/neethi/axis2c/neethi/src/assertion_builder.c Tue Apr 24 00:52:27 2007
@@ -99,6 +99,24 @@
}
else return NULL;
}
+ else if(axis2_strcmp(localname, RP_INCLUDE_TIMESTAMP)==0)
+ {
+ if(rp_match_secpolicy_qname(env, RP_INCLUDE_TIMESTAMP, node, element))
+ {
+ neethi_assertion_t *assertion = NULL;
+ assertion = neethi_assertion_create(env);
+ neethi_assertion_set_value(assertion, env, NULL, ASSERTION_TYPE_INCLUDE_TIMESTAMP);
+ return assertion;
+ }
+ else return NULL;
+ }
+ else if(axis2_strcmp(localname, RP_HTTPS_TOKEN)==0)
+ {
+ if(rp_match_secpolicy_qname(env, RP_HTTPS_TOKEN, node, element))
+ {
+ return rp_https_token_builder_build(env, node, element);
+ }
+ else return NULL;
+ }
else return NULL;
}
-
Modified: webservices/axis2/scratch/c/neethi/axis2c/neethi/src/secpolicy/builder/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/neethi/src/secpolicy/builder/Makefile.am?view=diff&rev=531810&r1=531809&r2=531810
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/neethi/src/secpolicy/builder/Makefile.am (original)
+++ webservices/axis2/scratch/c/neethi/axis2c/neethi/src/secpolicy/builder/Makefile.am Tue Apr 24 00:52:27 2007
@@ -7,7 +7,7 @@
supporting_tokens_builder.c \
transport_binding_builder.c username_token_builder.c \
wss10_builder.c transport_token_builder.c \
- token_identifier.c
+ token_identifier.c https_token_builder.c
librp_builder_la_LIBADD = ${AXIS2C_HOME}/lib
Added: webservices/axis2/scratch/c/neethi/axis2c/neethi/src/secpolicy/builder/https_token_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/neethi/src/secpolicy/builder/https_token_builder.c?view=auto&rev=531810
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/neethi/src/secpolicy/builder/https_token_builder.c (added)
+++ webservices/axis2/scratch/c/neethi/axis2c/neethi/src/secpolicy/builder/https_token_builder.c Tue Apr 24 00:52:27 2007
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <rp_https_token_builder.h>
+#include <neethi_operator.h>
+#include <neethi_policy.h>
+#include <neethi_exactlyone.h>
+#include <neethi_all.h>
+#include <neethi_engine.h>
+
+
+
+AXIS2_EXTERN neethi_assertion_t *AXIS2_CALL
+rp_https_token_builder_build(
+ const axutil_env_t *env,
+ axiom_node_t *node,
+ axiom_element_t *element)
+{
+ rp_https_token_t *https_token = NULL;
+ neethi_assertion_t *assertion = NULL;
+ axis2_char_t *value = NULL;
+
+ https_token = rp_https_token_create(env);
+
+ value = axiom_element_get_attribute_value_by_name(element, env, RP_REQUIRE_CLIENT_CERTIFICATE);
+
+ if(value)
+ {
+ if(axutil_strcmp(value,"true")==0)
+ {
+ rp_https_token_set_require_client_certificate(https_token,env,AXIS2_TRUE);
+ }
+ else if(axutil_strcmp(value,"false")==0)
+ {
+ rp_https_token_set_require_client_certificate(https_token,env,AXIS2_FALSE);
+ }
+ else return NULL;
+ }
+ assertion = neethi_assertion_create(env);
+ neethi_assertion_set_value(assertion, env, https_token, ASSERTION_TYPE_HTTPS_TOKEN);
+
+ return assertion;
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org