# rampart_context.h

Go to the documentation of this file.

    00001 /*
    00002  * Licensed to the Apache Software Foundation (ASF) under one or more
    00003  * contributor license agreements.  See the NOTICE file distributed with
    00004  * this work for additional information regarding copyright ownership.
    00005  * The ASF licenses this file to You under the Apache License, Version 2.0
    00006  * (the "License"); you may not use this file except in compliance with
    00007  * the License.  You may obtain a copy of the License at
    00008  *
    00009  *      http://www.apache.org/licenses/LICENSE-2.0
    00010  *
    00011  * Unless required by applicable law or agreed to in writing, software
    00012  * distributed under the License is distributed on an "AS IS" BASIS,
    00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00014  * See the License for the specific language governing permissions and
    00015  * limitations under the License.
    00016  */
    00017
    00018 #ifndef RAMPART_CONTEXT_H
    00019 #define RAMPART_CONTEXT_H
    00020
    00032 #include <rp_includes.h>
    00033 #include <rp_secpolicy.h>
    00034 #include <rampart_authn_provider.h>
    00035 #include <axutil_property.h>
    00036 #include <rampart_constants.h>
    00037 #include <rampart_callback.h>
    00038 #include <rampart_authn_provider.h>
    00039 #include <axis2_key_type.h>
    00040 #include <axis2_msg_ctx.h>
    00041 #include <oxs_key.h>
    00042 #include <axutil_array_list.h>
    00043 #include <rampart_saml_token.h>
    00044 #include <rampart_issued_token.h>
    00045 #include <oxs_key_mgr.h>
    00046
    00047 #ifdef __cplusplus
    00048 extern "C"
    00049 {
    00050 #endif
    00051
    00052     typedef struct rampart_context_t rampart_context_t;
    00053
    00054     typedef axis2_char_t *(AXIS2_CALL*
    00055         password_callback_fn)(
    00056         const axutil_env_t *env,
    00057         const axis2_char_t *username,
    00058         void *user_params);
    00059
    00060     typedef axis2_status_t (AXIS2_CALL*
    00061         rampart_is_replayed_fn)(
    00062         const axutil_env_t *env,
    00063         axis2_msg_ctx_t* msg_ctx,
    00064         rampart_context_t *rampart_context,
    00065         void *user_params);
    00066
    00067     typedef rampart_authn_provider_status_t (AXIS2_CALL*
    00068         auth_password_func)(
    00069         const axutil_env_t* env,
    00070         const axis2_char_t *username,
    00071         const axis2_char_t *password,
    00072         void *ctx);
    00073
    00074     typedef rampart_authn_provider_status_t (AXIS2_CALL*
    00075         auth_digest_func)(
    00076         const axutil_env_t* env,
    00077         const axis2_char_t *username,
    00078         const axis2_char_t *nonce,
    00079         const axis2_char_t *created,
    00080         const char *digest,
    00081         void *ctx);
    00082
    00083     /* This function will be used to store sct. Global id, local id will be given so function
    00084      * writer can store them in anyway. Get or Delete method will use any of the Global id or local
    00085      * id, so Store function writer should be ready for that.
    00086      */
    00087     typedef axis2_status_t (AXIS2_CALL*
    00088         store_security_context_token_fn)(
    00089         const axutil_env_t *env,
    00090         axis2_msg_ctx_t* msg_ctx,
    00091         axis2_char_t *sct_global_id,
    00092         axis2_char_t *sct_local_id,
    00093         void *sct,
    00094         void *user_params);
    00095
    00096     /* This function will be called to get previously stored sct. If secure conversation token is
    00097      * referred by this method, then sct_id will be not null. However, if security context token
    00098      * (pre-agreed and established offline) is refered then sct_id might be NULL. is_encryption is
    00099      * passed, so that if pre-agreed sct is different for encryption and signature, then it could be
    00100      * accessed. sct_id_type will be RAMPART_SCT_ID_TYPE_LOCAL or RAMPART_SCT_ID_TYPE_GLOBAL if
    00101      * sct_id is NOT NULL. If sct_id is NULL, then sct_id_type will be RAMPART_SCT_ID_TYPE_UNKNOWN
    00102      */
    00103     typedef void* (AXIS2_CALL*
    00104         obtain_security_context_token_fn)(
    00105         const axutil_env_t *env,
    00106         axis2_bool_t is_encryption,
    00107         axis2_msg_ctx_t* msg_ctx,
    00108         axis2_char_t *sct_id,
    00109         int sct_id_type,
    00110         void* user_params);
    00111
    00112     /* This function will be called to delete previously stored sct. sct_id_type can be
    00113      * RAMPART_SCT_ID_TYPE_LOCAL or RAMPART_SCT_ID_TYPE_GLOBAL
    00114      */
    00115     typedef axis2_status_t (AXIS2_CALL*
    00116         delete_security_context_token_fn)(
    00117         const axutil_env_t *env,
    00118         axis2_msg_ctx_t* msg_ctx,
    00119         axis2_char_t *sct_id,
    00120         int sct_id_type,
    00121         void* user_params);
    00122
    00123     /* Validates whether security context token is valid or not. Normally, we can directly send
    00124      * true as response. But if syntax of security context token is altered/added by using
    00125      * extensible mechanism (e.g having sessions, etc.) then user can implement this method.
    00126      * Axiom representation of the sct will be given as the parameter, because if sct is
    00127      * extended, we don't know the syntax. Method writer can implement whatever needed.
    00128      */
    00129     typedef axis2_status_t (AXIS2_CALL*
    00130     validate_security_context_token_fn)(
    00131         const axutil_env_t *env,
    00132         axiom_node_t *sct_node,
    00133         axis2_msg_ctx_t *msg_ctx,
    00134         void *user_params);
    00135
    00136
    00144     AXIS2_EXTERN rampart_context_t *AXIS2_CALL
    00145     rampart_context_create(
    00146         const axutil_env_t *env);
    00147
    00148
    00155     AXIS2_EXTERN void AXIS2_CALL
    00156     rampart_context_free(
    00157         rampart_context_t *rampart_context,
    00158         const axutil_env_t *env);
    00159
    00160
    00161     /****************************************************************/
    00162
    00173     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00174     rampart_context_set_policy_node(rampart_context_t *rampart_context,
    00175                                     const axutil_env_t *env,
    00176                                     axiom_node_t *policy_node);
    00177
    00188     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00189     rampart_context_set_prv_key(rampart_context_t *rampart_context,
    00190                                 const axutil_env_t *env,
    00191                                 void *prv_key);
    00201     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00202     rampart_context_set_prv_key_type(rampart_context_t *rampart_context,
    00203                                      const axutil_env_t *env,
    00204                                      axis2_key_type_t type);
    00214     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00215     rampart_context_set_certificate(rampart_context_t *rampart_context,
    00216                                     const axutil_env_t *env,
    00217                                     void *certificate);
    00227     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00228     rampart_context_set_certificate_type(rampart_context_t *rampart_context,
    00229                                          const axutil_env_t *env,
    00230                                          axis2_key_type_t type);
    00241     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00242     rampart_context_set_receiver_certificate(rampart_context_t *rampart_context,
    00243             const axutil_env_t *env,
    00244             void *receiver_certificate);
    00254     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00255     rampart_context_set_receiver_certificate_type(rampart_context_t *rampart_context,
    00256             const axutil_env_t *env,
    00257             axis2_key_type_t type);
    00267     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00268     rampart_context_set_user(rampart_context_t *rampart_context,
    00269                              const axutil_env_t *env,
    00270                              axis2_char_t *user);
    00280     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00281     rampart_context_set_password(rampart_context_t *rampart_context,
    00282                                  const axutil_env_t *env,
    00283                                  axis2_char_t *password);
    00293     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00294     rampart_context_set_prv_key_password(rampart_context_t *rampart_context,
    00295                                          const axutil_env_t *env,
    00296                                          axis2_char_t *prv_key_password);
    00307     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00308     rampart_context_set_pwcb_function(rampart_context_t *rampart_context,
    00309                                       const axutil_env_t *env,
    00310                                       password_callback_fn pwcb_function,
    00311                                       void *user_params);
    00321     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00322     rampart_context_set_replay_detect_function(rampart_context_t *rampart_context,
    00323         const axutil_env_t *env,
    00324         rampart_is_replayed_fn is_replayed_function,
    00325         void *user_params);
    00326
    00332     AXIS2_EXTERN void * AXIS2_CALL
    00333     rampart_context_get_rd_user_params(
    00334         rampart_context_t *rampart_context,
    00335         const axutil_env_t *env);
    00346     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00347     rampart_context_set_password_type(rampart_context_t *rampart_context,
    00348                                       const axutil_env_t *env,
    00349                                       axis2_char_t *password_type);
    00359     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00360     rampart_context_set_ttl(
    00361         rampart_context_t *rampart_context,
    00362         const axutil_env_t *env,
    00363         int ttl);
    00364
    00365     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00366     rampart_context_set_need_millisecond_precision(
    00367         rampart_context_t *rampart_context,
    00368         const axutil_env_t *env,
    00369         axis2_bool_t need_millisecond_precision);
    00370
    00371     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00372     rampart_context_set_clock_skew_buffer(
    00373         rampart_context_t *rampart_context,
    00374         const axutil_env_t *env,
    00375         int skew_buffer);
    00376
    00386     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00387     rampart_context_set_rd_val(rampart_context_t *rampart_context,
    00388                                const axutil_env_t *env,
    00389                                axis2_char_t *rd_val);
    00399     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00400     rampart_context_set_private_key_file(rampart_context_t *rampart_context,
    00401                                          const axutil_env_t *env,
    00402                                          axis2_char_t *private_key_file);
    00412     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00413     rampart_context_set_certificate_file(rampart_context_t *rampart_context,
    00414                                          const axutil_env_t *env,
    00415                                          axis2_char_t *certificate_file);
    00416
    00426     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00427     rampart_context_add_key(rampart_context_t *rampart_context,
    00428                                 const axutil_env_t *env,
    00429                                 oxs_key_t *key);
    00430
    00431     /**********************************************************8*/
    00432
    00433     /*Getters of the above set functions*/
    00441     AXIS2_EXTERN axiom_node_t *AXIS2_CALL
    00442     rampart_context_get_policy_node(
    00443         rampart_context_t *rampart_context,
    00444         const axutil_env_t *env);
    00453     AXIS2_EXTERN void *AXIS2_CALL
    00454     rampart_context_get_prv_key(
    00455         rampart_context_t *rampart_context,
    00456         const axutil_env_t *env);
    00465     AXIS2_EXTERN axis2_key_type_t AXIS2_CALL
    00466     rampart_context_get_prv_key_type(
    00467         rampart_context_t *rampart_context,
    00468         const axutil_env_t *env);
    00477     AXIS2_EXTERN void *AXIS2_CALL
    00478     rampart_context_get_certificate(
    00479         rampart_context_t *rampart_context,
    00480         const axutil_env_t *env);
    00489     AXIS2_EXTERN axis2_key_type_t AXIS2_CALL
    00490     rampart_context_get_certificate_type(
    00491         rampart_context_t *rampart_context,
    00492         const axutil_env_t *env);
    00501     AXIS2_EXTERN void *AXIS2_CALL
    00502     rampart_context_get_receiver_certificate(
    00503         rampart_context_t *rampart_context,
    00504         const axutil_env_t *env);
    00513     AXIS2_EXTERN axis2_key_type_t AXIS2_CALL
    00514     rampart_context_get_receiver_certificate_type(
    00515         rampart_context_t *rampart_context,
    00516         const axutil_env_t *env);
    00525     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00526     rampart_context_get_user(
    00527         rampart_context_t *rampart_context,
    00528         const axutil_env_t *env);
    00537     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00538     rampart_context_get_password(
    00539         rampart_context_t *rampart_context,
    00540         const axutil_env_t *env);
    00549     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00550     rampart_context_get_prv_key_password(
    00551         rampart_context_t *rampart_context,
    00552         const axutil_env_t *env);
    00561     AXIS2_EXTERN password_callback_fn AXIS2_CALL
    00562     rampart_context_get_pwcb_function(
    00563         rampart_context_t *rampart_context,
    00564         const axutil_env_t *env);
    00573     AXIS2_EXTERN rampart_is_replayed_fn AXIS2_CALL
    00574     rampart_context_get_replay_detect_function(
    00575         rampart_context_t *rampart_context,
    00576         const axutil_env_t *env);
    00585     AXIS2_EXTERN void * AXIS2_CALL
    00586     rampart_context_get_pwcb_user_params(
    00587         rampart_context_t *rampart_context,
    00588         const axutil_env_t *env);
    00597     AXIS2_EXTERN int AXIS2_CALL
    00598     rampart_context_get_ttl(
    00599         rampart_context_t *rampart_context,
    00600         const axutil_env_t *env);
    00601
    00602     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
    00603     rampart_context_get_need_millisecond_precision(
    00604         rampart_context_t *rampart_context,
    00605         const axutil_env_t *env);
    00606
    00607     AXIS2_EXTERN int AXIS2_CALL
    00608     rampart_context_get_clock_skew_buffer(
    00609         rampart_context_t *rampart_context,
    00610         const axutil_env_t *env);
    00611
    00620     AXIS2_EXTERN axis2_char_t* AXIS2_CALL
    00621     rampart_context_get_rd_val(
    00622         rampart_context_t *rampart_context,
    00623         const axutil_env_t *env);
    00633     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00634     rampart_context_get_password_type(
    00635         rampart_context_t *rampart_context,
    00636         const axutil_env_t *env);
    00645     AXIS2_EXTERN axutil_array_list_t* AXIS2_CALL
    00646     rampart_context_get_keys(rampart_context_t *rampart_context,
    00647         const axutil_env_t *env);
    00657     AXIS2_EXTERN oxs_key_t* AXIS2_CALL
    00658     rampart_context_get_key(rampart_context_t *rampart_context,
    00659         const axutil_env_t *env,
    00660         axis2_char_t* key_id);
    00670     AXIS2_EXTERN oxs_key_t* AXIS2_CALL
    00671     rampart_context_get_key_using_hash(rampart_context_t *rampart_context,
    00672         const axutil_env_t *env,
    00673         axis2_char_t* hash);
    00674
    00675     /*End of Getters */
    00676
    00677     /*Rampart specific functions */
    00686     AXIS2_EXTERN rp_secpolicy_t *AXIS2_CALL
    00687     rampart_context_get_secpolicy(
    00688         rampart_context_t *rampart_context,
    00689         const axutil_env_t *env);
    00699     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00700     rampart_context_set_secpolicy(rampart_context_t *rampart_context,
    00701                                   const axutil_env_t *env,
    00702                                   rp_secpolicy_t *secpolicy);
    00711     AXIS2_EXTERN rampart_callback_t *AXIS2_CALL
    00712     rampart_context_get_password_callback(
    00713         rampart_context_t *rampart_context,
    00714         const axutil_env_t *env);
    00723     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00724     rampart_context_set_password_callback(rampart_context_t *rampart_context,
    00725                                           const axutil_env_t *env,
    00726                                           rampart_callback_t *password_callback_module);
    00736     AXIS2_EXTERN auth_password_func AXIS2_CALL
    00737     rampart_context_get_auth_password_function(
    00738         rampart_context_t *rampart_context,
    00739         const axutil_env_t *env);
    00749     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00750     rampart_context_set_auth_password_function(rampart_context_t *rampart_context,
    00751             const axutil_env_t *env,
    00752             auth_password_func authenticate_with_password);
    00761     AXIS2_EXTERN auth_digest_func AXIS2_CALL
    00762     rampart_context_get_auth_digest_function(
    00763         rampart_context_t *rampart_context,
    00764         const axutil_env_t *env);
    00774     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00775     rampart_context_set_auth_digest_function(rampart_context_t *rampart_context,
    00776             const axutil_env_t *env,
    00777             auth_digest_func authenticate_with_digest);
    00786     AXIS2_EXTERN rampart_authn_provider_t *AXIS2_CALL
    00787     rampart_context_get_authn_provider(
    00788         rampart_context_t *rampart_context,
    00789         const axutil_env_t *env);
    00797     AXIS2_EXTERN void *AXIS2_CALL
    00798     rampart_context_get_replay_detector(
    00799         rampart_context_t *rampart_context,
    00800         const axutil_env_t *env);
    00809     AXIS2_EXTERN void *AXIS2_CALL
    00810     rampart_context_get_sct_provider(
    00811         rampart_context_t *rampart_context,
    00812         const axutil_env_t *env);
    00822     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00823     rampart_context_set_authn_provider(rampart_context_t *rampart_context,
    00824        const axutil_env_t *env,
    00825        rampart_authn_provider_t *authn_provider);
    00835         AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00836         rampart_context_set_replay_detector(rampart_context_t *rampart_context,
    00837        const axutil_env_t *env,
    00838        void *replay_detector);
    00848     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00849         rampart_context_set_sct_provider(rampart_context_t *rampart_context,
    00850        const axutil_env_t *env,
    00851        void *sct_module);
    00860     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
    00861     rampart_context_get_require_timestamp(
    00862         rampart_context_t *rampart_context,
    00863         const axutil_env_t *env);
    00872     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
    00873     rampart_context_get_require_ut(
    00874         rampart_context_t *rampart_context,
    00875         const axutil_env_t *env);
    00884     AXIS2_EXTERN rp_property_type_t AXIS2_CALL
    00885     rampart_context_get_binding_type(
    00886         rampart_context_t *rampart_context,
    00887         const axutil_env_t *env);
    00896     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
    00897     rampart_context_is_include_timestamp(
    00898         rampart_context_t *rampart_context,
    00899         const axutil_env_t *env);
    00908     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
    00909     rampart_context_is_include_username_token(
    00910         rampart_context_t *rampart_context,
    00911         const axutil_env_t *env);
    00923         AXIS2_EXTERN axis2_bool_t AXIS2_CALL
    00924         rampart_context_is_include_supporting_token(
    00925                 rampart_context_t *rampart_context, const axutil_env_t *env,
    00926                 axis2_bool_t server_side, axis2_bool_t is_inpath,
    00927                 rp_property_type_t token_type);
    00938     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
    00939     rampart_context_is_include_protection_saml_token(
    00940         rampart_context_t *rampart_context, axis2_bool_t server_side,
    00941         axis2_bool_t is_inpath, const axutil_env_t *env);
    00951         AXIS2_EXTERN rp_property_t * AXIS2_CALL
    00952         rampart_context_get_supporting_token(
    00953                 rampart_context_t *rampart_context,
    00954                 const axutil_env_t *env, rp_property_type_t token_type);
    00963     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00964     rampart_context_get_password_callback_class(
    00965         rampart_context_t *rampart_context,
    00966         const axutil_env_t *env);
    00975     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00976     rampart_context_get_authn_module_name(
    00977         rampart_context_t *rampart_context,
    00978         const axutil_env_t *env);
    00987     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00988     rampart_context_get_replay_detector_name(
    00989         rampart_context_t *rampart_context,
    00990         const axutil_env_t *env);
    00999     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    01000     rampart_context_get_sct_provider_name(
    01001         rampart_context_t *rampart_context,
    01002         const axutil_env_t *env);
    01011     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
    01012     rampart_context_is_encrypt_before_sign(
    01013         rampart_context_t *rampart_context,
    01014         const axutil_env_t *env);
    01023     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
    01024     rampart_context_is_encrypt_signature(
    01025         rampart_context_t *rampart_context,
    01026         const axutil_env_t *env);
    01037     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    01038     rampart_context_get_nodes_to_encrypt(
    01039         rampart_context_t *rampart_context,
    01040         const axutil_env_t *env,
    01041         axiom_soap_envelope_t *soap_envelope,
    01042         axutil_array_list_t *nodes_to_encrypt);
    01053     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    01054     rampart_context_get_nodes_to_sign(
    01055         rampart_context_t *rampart_context,
    01056         const axutil_env_t *env,
    01057         axiom_soap_envelope_t *soap_envelope,
    01058         axutil_array_list_t *nodes_to_sign);
    01069     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    01070     rampart_context_get_elements_to_encrypt(
    01071         rampart_context_t *rampart_context,
    01072         const axutil_env_t *env,
    01073         axiom_soap_envelope_t *soap_envelope,
    01074         axutil_array_list_t *nodes_to_encrypt);
    01085     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    01086     rampart_context_get_elements_to_sign(
    01087         rampart_context_t *rampart_context,
    01088         const axutil_env_t *env,
    01089         axiom_soap_envelope_t *soap_envelope,
    01090         axutil_array_list_t *nodes_to_sign);
    01102     AXIS2_EXTERN rp_property_t *AXIS2_CALL
    01103     rampart_context_get_token(
    01104         rampart_context_t *rampart_context,
    01105         const axutil_env_t *env,
    01106         axis2_bool_t for_encryption,
    01107         axis2_bool_t server_side,
    01108         axis2_bool_t is_inpath);
    01117     AXIS2_EXTERN rp_property_t *AXIS2_CALL
    01118     rampart_context_get_endorsing_token(
    01119         rampart_context_t *rampart_context,
    01120         const axutil_env_t *env);
    01127     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
    01128     rampart_context_check_is_derived_keys(
    01129         const axutil_env_t *env,
    01130         rp_property_t *token);
    01131
    01137     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    01138     rampart_context_get_derived_key_version(
    01139         const axutil_env_t *env,
    01140         rp_property_t *token);
    01141
    01150     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    01151     rampart_context_get_enc_sym_algo(
    01152         rampart_context_t *rampart_context,
    01153         const axutil_env_t *env);
    01162     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    01163     rampart_context_get_enc_asym_algo(
    01164         rampart_context_t *rampart_context,
    01165         const axutil_env_t *env);
    01166
    01173     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    01174     rampart_context_get_asym_sig_algo(
    01175         rampart_context_t *rampart_context,
    01176         const axutil_env_t *env);
    01177
    01184     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    01185     rampart_context_get_sym_sig_algo(
    01186         rampart_context_t *rampart_context,
    01187         const axutil_env_t *env);
    01188
    01197     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    01198     rampart_context_get_digest_mtd(
    01199         rampart_context_t *rampart_context,
    01200         const axutil_env_t *env);
    01209     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    01210     rampart_context_get_encryption_user(
    01211         rampart_context_t *rampart_context,
    01212         const axutil_env_t *env);
    01225     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
    01226     rampart_context_is_token_include(
    01227         rampart_context_t *rampart_context,
    01228         rp_property_t *token,
    01229         rp_property_type_t token_type,
    01230         axis2_bool_t server_side,
    01231         axis2_bool_t is_inpath,
    01232         const axutil_env_t *env);
    01242     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    01243     rampart_context_get_key_identifier(
    01244         rampart_context_t *rampart_context,
    01245         rp_property_t *token,
    01246         const axutil_env_t *env);
    01255     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
    01256     rampart_context_is_token_type_supported(
    01257         rp_property_type_t token_type,
    01258         const axutil_env_t *env);
    01269     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
    01270     rampart_context_is_key_identifier_type_supported(
    01271         rampart_context_t *rampart_context,
    01272         rp_property_t *token,
    01273         axis2_char_t *identifier,
    01274         const axutil_env_t *env);
    01283     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    01284     rampart_context_get_layout(
    01285         rampart_context_t *rampart_context,
    01286         const axutil_env_t *env);
    01295     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
    01296     rampart_context_check_whether_to_encrypt(
    01297         rampart_context_t *rampart_context,
    01298         const axutil_env_t *env);
    01307     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
    01308     rampart_context_check_whether_to_sign(
    01309         rampart_context_t *rampart_context,
    01310         const axutil_env_t *env);
    01319     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    01320     rampart_context_set_user_from_file(
    01321         rampart_context_t *rampart_context,
    01322         const axutil_env_t *env);
    01331     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    01332     rampart_context_set_password_type_from_file(
    01333         rampart_context_t *rampart_context,
    01334         const axutil_env_t *env);
    01343     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    01344     rampart_context_get_certificate_file(
    01345         rampart_context_t *rampart_context,
    01346         const axutil_env_t *env);
    01355     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    01356     rampart_context_get_receiver_certificate_file(
    01357         rampart_context_t *rampart_context,
    01358         const axutil_env_t *env);
    01367     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    01368     rampart_context_get_private_key_file(
    01369         rampart_context_t *rampart_context,
    01370         const axutil_env_t *env);
    01379     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    01380     rampart_context_set_ttl_from_file(
    01381         rampart_context_t *rampart_context,
    01382         const axutil_env_t *env);
    01383
    01384     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    01385     rampart_context_set_clock_skew_buffer_from_file(
    01386         rampart_context_t *rampart_context,
    01387         const axutil_env_t *env);
    01388
    01389     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    01390     rampart_context_set_need_millisecond_precision_from_file(
    01391         rampart_context_t *rampart_context,
    01392         const axutil_env_t *env);
    01393
    01402     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    01403     rampart_context_set_rd_val_from_file(
    01404         rampart_context_t *rampart_context,
    01405         const axutil_env_t *env);
    01414     AXIS2_EXTERN oxs_key_t *AXIS2_CALL
    01415     rampart_context_get_encryption_session_key(
    01416         rampart_context_t *rampart_context,
    01417         const axutil_env_t *env);
    01427     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    01428     rampart_context_set_encryption_session_key(
    01429         rampart_context_t *rampart_context,
    01430         const axutil_env_t *env,
    01431         oxs_key_t *session_key);
    01440     AXIS2_EXTERN oxs_key_t *AXIS2_CALL
    01441     rampart_context_get_signature_session_key(
    01442         rampart_context_t *rampart_context,
    01443         const axutil_env_t *env);
    01453     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    01454     rampart_context_set_signature_session_key(
    01455         rampart_context_t *rampart_context,
    01456         const axutil_env_t *env,
    01457         oxs_key_t *session_key);
    01466     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    01467     rampart_context_increment_ref(
    01468         rampart_context_t *rampart_context,
    01469         const axutil_env_t *env);
    01478     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
    01479     rampart_context_is_sig_confirmation_reqd(
    01480         rampart_context_t *rampart_context,
    01481         const axutil_env_t *env);
    01490     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    01491     rampart_context_get_encryption_token_id(
    01492         rampart_context_t *rampart_context,
    01493         const axutil_env_t *env,
    01494         axis2_msg_ctx_t* msg_ctx);
    01503     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    01504     rampart_context_get_signature_token_id(
    01505         rampart_context_t *rampart_context,
    01506         const axutil_env_t *env,
    01507         axis2_msg_ctx_t* msg_ctx);
    01517     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    01518     rampart_context_set_encryption_token_id(
    01519         rampart_context_t *rampart_context,
    01520         const axutil_env_t *env,
    01521         axis2_char_t *sct_id,
    01522         axis2_msg_ctx_t* msg_ctx);
    01532     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    01533     rampart_context_set_signature_token_id(
    01534         rampart_context_t *rampart_context,
    01535         const axutil_env_t *env,
    01536         axis2_char_t *sct_id,
    01537         axis2_msg_ctx_t* msg_ctx);
    01538
    01539
    01540     /* Return the saml token of token type set in the rampart context */
    01550     AXIS2_EXTERN rampart_saml_token_t * AXIS2_CALL
    01551     rampart_context_get_saml_token(rampart_context_t *rampart_context,
    01552                                         const axutil_env_t *env,
    01553                                                                                 rampart_st_type_t token_type);
    01554
    01555     /* Add a saml token */
    01565     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    01566     rampart_context_add_saml_token(rampart_context_t *rampart_context,
    01567                                     const axutil_env_t *env,
    01568                                     rampart_saml_token_t *token);
    01578      AXIS2_EXTERN axis2_status_t AXIS2_CALL
    01579     rampart_context_set_saml_tokens(
    01580         rampart_context_t *rampart_context,
    01581         const axutil_env_t *env,
    01582         axutil_array_list_t *tokens);
    01591     AXIS2_EXTERN issued_token_callback_func AXIS2_CALL
    01592     rampart_context_get_issued_token_aquire_function(
    01593         rampart_context_t *rampart_context,
    01594         const axutil_env_t *env);
    01604     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    01605     rampart_context_set_issued_token_aquire_function(
    01606         rampart_context_t *rampart_context,
    01607         const axutil_env_t *env,
    01608         issued_token_callback_func issued_token_aquire);
    01617     AXIS2_EXTERN int AXIS2_CALL
    01618     rampart_context_get_encryption_derived_key_len(
    01619         rampart_context_t *rampart_context,
    01620         const axutil_env_t *env);
    01629     AXIS2_EXTERN int AXIS2_CALL
    01630     rampart_context_get_signature_derived_key_len(
    01631         rampart_context_t *rampart_context,
    01632         const axutil_env_t *env);
    01641     AXIS2_EXTERN rp_algorithmsuite_t *AXIS2_CALL
    01642     rampart_context_get_algorithmsuite(
    01643         rampart_context_t *rampart_context,
    01644         const axutil_env_t *env);
    01645
    01652     AXIS2_EXTERN oxs_key_mgr_t * AXIS2_CALL
    01653     rampart_context_get_key_mgr(
    01654         rampart_context_t *rampart_context,
    01655         const axutil_env_t *env);
    01656
    01664     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    01665     rampart_context_set_key_mgr(
    01666         rampart_context_t *rampart_context,
    01667         const axutil_env_t *env,
    01668         oxs_key_mgr_t *key_mgr);
    01669
    01676     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    01677     rampart_context_get_pkcs12_file_name(
    01678         rampart_context_t *rampart_context,
    01679         const axutil_env_t *env);
    01680
    01690     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    01691     rampart_context_set_custom_tokens(rampart_context_t *rampart_context,
    01692                                         const axutil_env_t *env,
    01693                                         axutil_array_list_t *tokens);
    01694
    01702     AXIS2_EXTERN axutil_array_list_t* AXIS2_CALL
    01703     rampart_context_get_custom_tokens(rampart_context_t *rampart_context,
    01704                                         const axutil_env_t *env);
    01705
    01712     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    01713     rampart_context_get_receiver_certificate_file(
    01714         rampart_context_t *rampart_context,
    01715         const axutil_env_t *env);
    01716
    01723     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
    01724     rampart_context_get_found_cert_in_shp(
    01725         rampart_context_t *rampart_context,
    01726         const axutil_env_t *env);
    01727
    01735     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    01736     rampart_context_set_found_cert_in_shp(
    01737         rampart_context_t *rampart_context,
    01738         const axutil_env_t *env,
    01739         axis2_bool_t found_cert_in_shp);
    01740
    01747     AXIS2_EXTERN oxs_x509_cert_t *AXIS2_CALL
    01748     rampart_context_get_receiver_cert_found_in_shp(
    01749         rampart_context_t *rampart_context,
    01750         const axutil_env_t *env);
    01751
    01759     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    01760     rampart_context_set_receiver_cert_found_in_shp(
    01761         rampart_context_t *rampart_context,
    01762         const axutil_env_t *env,
    01763         oxs_x509_cert_t *cert);
    01764
    01765     AXIS2_EXTERN void * AXIS2_CALL
    01766     rampart_context_get_key_store_buff(
    01767         rampart_context_t *rampart_context,
    01768         const axutil_env_t *env);
    01769
    01770     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    01771     rampart_context_set_key_store_buff(
    01772         rampart_context_t *rampart_context,
    01773         const axutil_env_t *env,
    01774         void *key_store_buf,
    01775         int length);
    01776
    01784     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    01785     rampart_context_set_store_security_context_token_fn(
    01786         rampart_context_t *rampart_context,
    01787         const axutil_env_t *env,
    01788         store_security_context_token_fn store_fn);
    01789
    01797     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    01798     rampart_context_set_obtain_security_context_token_fn(
    01799         rampart_context_t *rampart_context,
    01800         const axutil_env_t *env,
    01801         obtain_security_context_token_fn get_fn);
    01802
    01810     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    01811     rampart_context_set_delete_security_context_token_fn(
    01812         rampart_context_t *rampart_context,
    01813         const axutil_env_t *env,
    01814         delete_security_context_token_fn delete_fn);
    01815
    01823     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    01824     rampart_context_set_security_context_token_user_params(
    01825         rampart_context_t *rampart_context,
    01826         const axutil_env_t *env,
    01827         void* user_params);
    01828
    01836     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    01837     rampart_context_set_validate_security_context_token_fn(
    01838         rampart_context_t *rampart_context,
    01839         const axutil_env_t *env,
    01840         validate_security_context_token_fn validate_fn);
    01841
    01848     AXIS2_EXTERN store_security_context_token_fn AXIS2_CALL
    01849     rampart_context_get_store_security_context_token_fn(
    01850         rampart_context_t *rampart_context,
    01851         const axutil_env_t *env);
    01852
    01859     AXIS2_EXTERN obtain_security_context_token_fn AXIS2_CALL
    01860     rampart_context_get_obtain_security_context_token_fn(
    01861         rampart_context_t *rampart_context,
    01862         const axutil_env_t *env);
    01863
    01870     AXIS2_EXTERN delete_security_context_token_fn AXIS2_CALL
    01871     rampart_context_get_delete_security_context_token_fn(
    01872         rampart_context_t *rampart_context,
    01873         const axutil_env_t *env);
    01874
    01882     AXIS2_EXTERN void* AXIS2_CALL
    01883     rampart_context_get_security_context_token_user_params(
    01884         rampart_context_t *rampart_context,
    01885         const axutil_env_t *env);
    01886
    01893     AXIS2_EXTERN validate_security_context_token_fn AXIS2_CALL
    01894     rampart_context_get_validate_security_context_token_fn(
    01895         rampart_context_t *rampart_context,
    01896         const axutil_env_t *env);
    01897
    01904     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
    01905     rampart_context_is_different_session_key_for_enc_and_sign(
    01906         const axutil_env_t *env,
    01907         rampart_context_t *rampart_context);
    01908
    01909     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    01910 rampart_context_set_receiver_certificate_file(
    01911         rampart_context_t *rampart_context,
    01912         const axutil_env_t *env,
    01913         axis2_char_t *receiver_certificate_file);
    01914
    01915
    01916
    01917 #ifdef __cplusplus
    01918 }
    01919 #endif
    01920 #endif