1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
#include <rp_security_context_token.h>
#include "../../../util/test/util/create_env.h"
axutil_env_t *env = NULL;
rp_security_context_token_t * security_context_token = NULL;
axis2_char_t * inclusion = NULL ;
axis2_status_t status = AXIS2_FAILURE ;
axis2_bool_t derivedkeys ;
axis2_bool_t require_external_uri_ref;
axis2_bool_t sc10_security_context_token;
/** @brief test options
* build a om from a client options
*/
axis2_status_t test_security_context_token(axutil_env_t *env)
{
security_context_token = rp_security_context_token_create(env);
inclusion = rp_security_context_token_get_inclusion(security_context_token,env);
printf("%s\n",inclusion);
status = rp_security_context_token_set_inclusion(security_context_token,env,inclusion);
if (status == AXIS2_SUCCESS)
printf("rp security context token set is success\n");
derivedkeys = rp_security_context_token_get_derivedkeys(security_context_token,env);
status = rp_security_context_token_set_derivedkeys(security_context_token,env,derivedkeys);
if (status == AXIS2_SUCCESS)
printf("rp security token derivedkeys set is success\n");
require_external_uri_ref = rp_security_context_token_get_require_external_uri_ref(security_context_token,env);
status = rp_security_context_token_set_require_external_uri_ref(security_context_token,env,require_external_uri_ref);
if (status == AXIS2_SUCCESS)
printf("rp security require external uri set is success\n");
sc10_security_context_token = rp_security_context_token_get_sc10_security_context_token(security_context_token,env);
status = rp_security_context_token_set_sc10_security_context_token(security_context_token,env,sc10_security_context_token);
if (status == AXIS2_SUCCESS)
printf("rp security sc10 security token set is success\n");
rp_security_context_token_increment_ref(security_context_token,env);
rp_security_context_token_free(security_context_token,env);
return AXIS2_SUCCESS;
}
int main()
{
int status = AXIS2_SUCCESS;
env = create_environment();
status = test_security_context_token(env);
if(status == AXIS2_FAILURE)
{
printf(" test failed");
}
axutil_env_free(env);
return 0;
}
|