00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef RAMPART_ACTION_H
00019 #define RAMPART_ACTION_H
00020
00021
00027 #include <axis2_defines.h>
00028 #include <axis2_env.h>
00029 #include <axiom_node.h>
00030 #include <oxs_buffer.h>
00031 #include <oxs_key.h>
00032 #include <axis2_conf_ctx.h>
00033
00034 #ifdef __cplusplus
00035 extern "C"
00036 {
00037 #endif
00038
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00078 typedef struct rampart_actions_ops rampart_actions_ops_t;
00080 typedef struct rampart_actions rampart_actions_t;
00081
00082
00083 struct rampart_actions_ops
00084 {
00085
00092 axis2_char_t *(AXIS2_CALL *
00093 get_encryption_user )(
00094 rampart_actions_t *actions,
00095 const axis2_env_t *env
00096 );
00097
00104 axis2_char_t *(AXIS2_CALL *
00105 get_encryption_sym_algorithm )(
00106 rampart_actions_t *actions,
00107 const axis2_env_t *env
00108 );
00109
00116 axis2_char_t *(AXIS2_CALL *
00117 get_encryption_key_transport_algorithm )(
00118 rampart_actions_t *actions,
00119 const axis2_env_t *env
00120 );
00121
00122
00129 axis2_char_t *(AXIS2_CALL *
00130 get_items )(
00131 rampart_actions_t *actions,
00132 const axis2_env_t *env
00133 );
00140 axis2_char_t *(AXIS2_CALL *
00141 get_password_type )(
00142 rampart_actions_t *actions,
00143 const axis2_env_t *env
00144 );
00145
00152 axis2_char_t *(AXIS2_CALL *
00153 get_user )(
00154 rampart_actions_t *actions,
00155 const axis2_env_t *env
00156 );
00157
00164 axis2_char_t *(AXIS2_CALL *
00165 get_password_callback_class )(
00166 rampart_actions_t *actions,
00167 const axis2_env_t *env
00168 );
00169
00176 axis2_char_t *(AXIS2_CALL *
00177 get_encryption_key_file )(
00178 rampart_actions_t *actions,
00179 const axis2_env_t *env
00180 );
00181
00188 axis2_char_t *(AXIS2_CALL *
00189 get_decryption_key_file )(
00190 rampart_actions_t *actions,
00191 const axis2_env_t *env
00192 );
00193
00194
00201 axis2_char_t *(AXIS2_CALL *
00202 get_signature_prop_file)(
00203 rampart_actions_t *actions,
00204 const axis2_env_t *env
00205 );
00206
00213 axis2_char_t *(AXIS2_CALL *
00214 get_signature_key_identifier)(
00215 rampart_actions_t *actions,
00216 const axis2_env_t *env
00217 );
00218
00225 axis2_char_t *(AXIS2_CALL *
00226 get_encryption_key_identifier)(
00227 rampart_actions_t *actions,
00228 const axis2_env_t *env
00229 );
00230
00237 axis2_char_t *(AXIS2_CALL *
00238 get_signature_parts)(
00239 rampart_actions_t *actions,
00240 const axis2_env_t *env
00241 );
00242
00249 axis2_char_t *(AXIS2_CALL *
00250 get_encryption_parts)(
00251 rampart_actions_t *actions,
00252 const axis2_env_t *env
00253 );
00254
00261 axis2_char_t *(AXIS2_CALL *
00262 get_time_to_live)(
00263 rampart_actions_t *actions,
00264 const axis2_env_t *env
00265 );
00266
00274 axis2_status_t (AXIS2_CALL *
00275 set_encryption_user)(
00276 rampart_actions_t *actions,
00277 const axis2_env_t *env,
00278 axis2_char_t *encryption_user
00279 );
00280
00288 axis2_status_t (AXIS2_CALL *
00289 set_encryption_sym_algorithm)(
00290 rampart_actions_t *actions,
00291 const axis2_env_t *env,
00292 axis2_char_t *encryption_sym_algorithm
00293 );
00294
00302 axis2_status_t (AXIS2_CALL *
00303 set_encryption_key_transport_algorithm)(
00304 rampart_actions_t *actions,
00305 const axis2_env_t *env,
00306 axis2_char_t *encryption_key_transport_algorithm
00307 );
00308
00316 axis2_status_t (AXIS2_CALL *
00317 set_items)(
00318 rampart_actions_t *actions,
00319 const axis2_env_t *env,
00320 axis2_char_t *items
00321 );
00322
00330 axis2_status_t (AXIS2_CALL *
00331 set_password_type)(
00332 rampart_actions_t *actions,
00333 const axis2_env_t *env,
00334 axis2_char_t *password_type
00335 );
00336
00344 axis2_status_t (AXIS2_CALL *
00345 set_user)(
00346 rampart_actions_t *actions,
00347 const axis2_env_t *env,
00348 axis2_char_t *user
00349 );
00350
00358 axis2_status_t (AXIS2_CALL *
00359 set_password_callback_class)(
00360 rampart_actions_t *actions,
00361 const axis2_env_t *env,
00362 axis2_char_t *password_callback_class
00363 );
00364
00372 axis2_status_t (AXIS2_CALL *
00373 set_encryption_key_file)(
00374 rampart_actions_t *actions,
00375 const axis2_env_t *env,
00376 axis2_char_t *encryption_key_file
00377 );
00378
00386 axis2_status_t (AXIS2_CALL *
00387 set_decryption_key_file)(
00388 rampart_actions_t *actions,
00389 const axis2_env_t *env,
00390 axis2_char_t *decryption_key_file
00391 );
00392
00400 axis2_status_t (AXIS2_CALL *
00401 set_signature_prop_file)(
00402 rampart_actions_t *actions,
00403 const axis2_env_t *env,
00404 axis2_char_t *signature_prop_file
00405 );
00406
00414 axis2_status_t (AXIS2_CALL *
00415 set_signature_key_identifier)(
00416 rampart_actions_t *actions,
00417 const axis2_env_t *env,
00418 axis2_char_t *signature_key_identifier
00419 );
00420
00428 axis2_status_t (AXIS2_CALL *
00429 set_encryption_key_identifier)(
00430 rampart_actions_t *actions,
00431 const axis2_env_t *env,
00432 axis2_char_t *encryption_key_identifier
00433 );
00434
00442 axis2_status_t (AXIS2_CALL *
00443 set_signature_parts)(
00444 rampart_actions_t *actions,
00445 const axis2_env_t *env,
00446 axis2_char_t *signature_parts
00447 );
00448
00456 axis2_status_t (AXIS2_CALL *
00457 set_encryption_parts)(
00458 rampart_actions_t *actions,
00459 const axis2_env_t *env,
00460 axis2_char_t *encryption_parts
00461 );
00469 axis2_status_t (AXIS2_CALL *
00470 set_time_to_live)(
00471 rampart_actions_t *actions,
00472 const axis2_env_t *env,
00473 axis2_char_t *time_to_live
00474 );
00475
00476
00483 axis2_status_t (AXIS2_CALL *
00484 reset)(
00485 rampart_actions_t *actions,
00486 const axis2_env_t *env
00487 );
00488
00495 axis2_status_t (AXIS2_CALL *
00496 free)(
00497 rampart_actions_t *actions,
00498 const axis2_env_t *env
00499 );
00500
00507 axis2_status_t (AXIS2_CALL *
00508 populate_from_params)(
00509 rampart_actions_t *actions,
00510 const axis2_env_t *env,
00511 axis2_param_t *param_action
00512 );
00520 axis2_status_t (AXIS2_CALL *
00521 populate_from_ctx) (
00522 rampart_actions_t *actions,
00523 const axis2_env_t *env,
00524 axis2_ctx_t *ctx
00525 );
00526
00527 };
00528
00529 struct rampart_actions
00530 {
00532 rampart_actions_ops_t *ops;
00533 };
00534
00535
00536 AXIS2_EXTERN rampart_actions_t *AXIS2_CALL
00537 rampart_actions_create(const axis2_env_t *env);
00538
00539
00540
00541 #define RAMPART_ACTIONS_GET_ENC_USER(actions, env) \
00542 ((actions)->ops->get_encryption_user(actions, env) )
00543
00544 #define RAMPART_ACTIONS_SET_ENC_USER(actions, env, encryption_user) \
00545 ((actions)->ops->set_encryption_user(actions, env, encryption_user) )
00546
00547 #define RAMPART_ACTIONS_GET_ENC_SYM_ALGO(actions, env) \
00548 ((actions)->ops->get_encryption_sym_algorithm(actions, env) )
00549
00550 #define RAMPART_ACTIONS_SET_ENC_SYM_ALGO(actions, env, encryption_sym_algorithm) \
00551 ((actions)->ops->set_encryption_sym_algorithm(actions, env, encryption_sym_algorithm) )
00552
00553 #define RAMPART_ACTIONS_GET_ENC_KT_ALGO(actions, env) \
00554 ((actions)->ops->get_encryption_key_transport_algorithm(actions, env) )
00555
00556 #define RAMPART_ACTIONS_SET_ENC_KT_ALGO(actions, env, encryption_key_transport_algorithm)\
00557 ((actions)->ops->set_encryption_key_transport_algorithm(actions, env, encryption_key_transport_algorithm))
00558
00559 #define RAMPART_ACTIONS_GET_ITEMS(actions, env) \
00560 ((actions)->ops->get_items(actions, env) )
00561
00562 #define RAMPART_ACTIONS_SET_ITEMS(actions, env, items)\
00563 ((actions)->ops->set_items(actions, env, items))
00564
00565 #define RAMPART_ACTIONS_GET_PASSWORD_TYPE(actions, env) \
00566 ((actions)->ops->get_password_type(actions, env) )
00567
00568 #define RAMPART_ACTIONS_SET_PASSWORD_TYPE(actions, env, password_type)\
00569 ((actions)->ops->set_password_type(actions, env, password_type))
00570
00571 #define RAMPART_ACTIONS_GET_USER(actions, env) \
00572 ((actions)->ops->get_user(actions, env) )
00573
00574 #define RAMPART_ACTIONS_SET_USER(actions, env, user)\
00575 ((actions)->ops->set_user(actions, env, user))
00576
00577 #define RAMPART_ACTIONS_GET_PW_CB_CLASS(actions, env) \
00578 ((actions)->ops->get_password_callback_class(actions, env) )
00579
00580 #define RAMPART_ACTIONS_SET_PW_CB_CLASS(actions, env, password_callback_class)\
00581 ((actions)->ops->set_password_callback_class(actions, env,password_callback_class ))
00582
00583 #define RAMPART_ACTIONS_GET_ENC_KEY_FILE(actions, env) \
00584 ((actions)->ops->get_encryption_key_file(actions, env) )
00585
00586 #define RAMPART_ACTIONS_SET_ENC_KEY_FILE(actions, env, encryption_key_file)\
00587 ((actions)->ops->set_encryption_key_file(actions, env, encryption_key_file))
00588
00589 #define RAMPART_ACTIONS_GET_DEC_KEY_FILE(actions, env) \
00590 ((actions)->ops->get_decryption_key_file(actions, env) )
00591
00592 #define RAMPART_ACTIONS_SET_DEC_KEY_FILE(actions, env, decryption_key_file)\
00593 ((actions)->ops->set_decryption_key_file(actions, env, decryption_key_file))
00594
00595 #define RAMPART_ACTIONS_GET_SIG_PROP_FILE(actions, env) \
00596 ((actions)->ops->get_signature_prop_file(actions, env) )
00597
00598 #define RAMPART_ACTIONS_SET_SIG_PROP_FILE(actions, env, signature_prop_file)\
00599 ((actions)->ops->set_signature_prop_file(actions, env, signature_prop_file))
00600
00601 #define RAMPART_ACTIONS_GET_SIG_KEY_IDENTIFIER(actions, env) \
00602 ((actions)->ops->get_signature_key_identifier(actions, env) )
00603
00604 #define RAMPART_ACTIONS_SET_SIG_KEY_IDENTIFIER(actions, env, signature_key_identifier)\
00605 ((actions)->ops->set_signature_key_identifier(actions, env, signature_key_identifier))
00606
00607 #define RAMPART_ACTIONS_GET_ENC_KEY_IDENTIFIER(actions, env) \
00608 ((actions)->ops->get_encryption_key_identifier(actions, env) )
00609
00610 #define RAMPART_ACTIONS_SET_ENC_KEY_IDENTIFIER(actions, env, encryption_key_identifier)\
00611 ((actions)->ops->set_encryption_key_identifier(actions, env, encryption_key_identifier))
00612
00613 #define RAMPART_ACTIONS_GET_SIGNATURE_PARTS(actions, env) \
00614 ((actions)->ops->get_signature_parts(actions, env) )
00615
00616 #define RAMPART_ACTIONS_SET_SIGNATURE_PARTS(actions, env, signature_parts)\
00617 ((actions)->ops->set_signature_parts(actions, env, signature_parts))
00618
00619 #define RAMPART_ACTIONS_GET_ENCRYPTION_PARTS(actions, env) \
00620 ((actions)->ops->get_encryption_parts(actions, env) )
00621
00622 #define RAMPART_ACTIONS_SET_ENCRYPTION_PARTS(actions, env, encryption_parts)\
00623 ((actions)->ops->set_encryption_parts(actions, env, encryption_parts))
00624
00625 #define RAMPART_ACTIONS_GET_TIME_TO_LIVE(actions, env) \
00626 ((actions)->ops->get_time_to_live(actions, env) )
00627
00628 #define RAMPART_ACTIONS_SET_TIME_TO_LIVE(actions, env, time_to_live)\
00629 ((actions)->ops->set_time_to_live(actions, env, time_to_live))
00630
00631 #define RAMPART_ACTIONS_RESET(actions, env) \
00632 ((actions)->ops->reset(actions, env))
00633
00634 #define RAMPART_ACTIONS_FREE(actions, env) \
00635 ((actions)->ops->free(actions, env))
00636
00637 #define RAMPART_ACTIONS_POPULATE_FROM_PARAMS(actions, env, param_action)\
00638 ((actions)->ops->populate_from_params(actions, env, param_action))
00639
00640 #define RAMPART_ACTIONS_POPULATE_FROM_CTX(actions, env, ctx)\
00641 ((actions)->ops->populate_from_ctx(actions, env, ctx))
00642
00643
00644
00646 #ifdef __cplusplus
00647 }
00648 #endif
00649
00650 #endif