24 #ifndef GLOBUS_OLDGAA_UTILS_H
25 #define GLOBUS_OLDGAA_UTILS_H
41 #define GRID_CA_POLICY_FILENAME "ca-signing-policy.conf"
43 #define OLDGAA_X509_AUTHORITY "X509"
45 #define POSITIVE_RIGHTS "pos_rights"
46 #define NEGATIVE_RIGHTS "neg_rights"
48 #define COND_PREFIX "cond_"
49 #define PRINCIPAL_ACCESS_PREFIX "access_"
50 #define PRINCIPAL_GRANTOR_PREFIX "grantor_"
51 #define POS_RIGHTS_PREFIX "pos"
52 #define NEG_RIGHTS_PREFIX "neg"
55 #define STRING_DELIMITER '\''
56 #define ESCAPE_CHARACTER '\\'
57 #define END_OF_LINE '\n'
59 #define ERROR_WHILE_GETTING_DEFAULT_POLICY_LOCATION 100
60 #define ERROR_WHILE_RETRIEVING_POLICY 101
62 #define ERROR_WHILE_PARSING_PRINCIPALS 200
63 #define ERROR_WHILE_PARSING_CONDITIONS 201
64 #define ERROR_WHILE_PARSING_RIGHTS 202
69 typedef struct policy_file_context_struct policy_file_context,
70 *policy_file_context_ptr;
71 struct policy_file_context_struct {
90 oldgaa_globus_cleanup(oldgaa_sec_context_ptr *oldgaa_sc,
91 oldgaa_rights_ptr *rights,
92 oldgaa_options_ptr options,
93 oldgaa_answer_ptr *answer,
94 oldgaa_data_ptr policy_db,
95 oldgaa_sec_attrb_ptr *attributes);
102 oldgaa_globus_initialize(oldgaa_sec_context_ptr *oldgaa_sc,
103 oldgaa_rights_ptr *rights,
104 oldgaa_options_ptr *options,
105 oldgaa_data_ptr *policy_db,
111 oldgaa_sec_context_ptr
112 oldgaa_globus_allocate_sec_context(
char *signer);
115 oldgaa_globus_allocate_rights();
122 oldgaa_globus_policy_retrieve(uint32 *minor_status,
123 oldgaa_data_ptr
object,
124 oldgaa_data_ptr policy_db, ...);
126 policy_file_context_ptr
127 oldgaa_globus_policy_file_open(
const char *filename);
130 oldgaa_globus_policy_file_close(policy_file_context_ptr pcontext);
138 oldgaa_globus_parse_policy (policy_file_context_ptr pcontext,
139 oldgaa_policy_ptr *policy_handle);
142 oldgaa_globus_parse_rights(policy_file_context_ptr pcontext,
144 oldgaa_rights_ptr *start,
149 oldgaa_globus_parse_conditions( policy_file_context_ptr pcontext,
150 oldgaa_conditions_ptr *conditions,
152 oldgaa_cond_bindings_ptr *list,
156 oldgaa_globus_print_rights(oldgaa_rights_ptr rights);
160 oldgaa_globus_print_attributes(oldgaa_sec_attrb_ptr attributes);
164 oldgaa_globus_get_trusted_ca_list(oldgaa_sec_attrb_ptr *attributes,
165 oldgaa_policy_ptr policy_handle,
166 oldgaa_rights_ptr rights);