17 #ifndef _GLOBUS_I_GSI_CALLBACK_H_
18 #define _GLOBUS_I_GSI_CALLBACK_H_
20 #ifndef GLOBUS_DONT_DOCUMENT_INTERNAL
34 extern int globus_i_gsi_callback_debug_level;
35 extern FILE * globus_i_gsi_callback_debug_fstream;
37 #define GLOBUS_I_GSI_CALLBACK_DEBUG(_LEVEL_) \
38 (globus_i_gsi_callback_debug_level >= (_LEVEL_))
40 #define GLOBUS_I_GSI_CALLBACK_DEBUG_FPRINTF(_LEVEL_, _MESSAGE_) \
42 if (GLOBUS_I_GSI_CALLBACK_DEBUG(_LEVEL_)) \
44 globus_libc_fprintf _MESSAGE_; \
48 #define GLOBUS_I_GSI_CALLBACK_DEBUG_FNPRINTF(_LEVEL_, _MESSAGE_) \
50 if (GLOBUS_I_GSI_CALLBACK_DEBUG(_LEVEL_)) \
53 globus_common_create_nstring _MESSAGE_; \
54 globus_libc_fprintf(globus_i_gsi_callback_debug_fstream, \
56 globus_libc_free(_tmp_str_); \
60 #define GLOBUS_I_GSI_CALLBACK_DEBUG_PRINT(_LEVEL_, _MESSAGE_) \
62 if (GLOBUS_I_GSI_CALLBACK_DEBUG(_LEVEL_)) \
64 globus_libc_fprintf(globus_i_gsi_callback_debug_fstream, \
69 #define GLOBUS_I_GSI_CALLBACK_DEBUG_PRINT_OBJECT(_LEVEL_, _OBJ_NAME_, _OBJ_) \
71 if (GLOBUS_I_GSI_CALLBACK_DEBUG(_LEVEL_)) \
73 _OBJ_NAME_##_print_fp(globus_i_gsi_callback_debug_fstream, _OBJ_); \
79 #define GLOBUS_I_GSI_CALLBACK_DEBUG(_LEVEL_) 0
80 #define GLOBUS_I_GSI_CALLBACK_DEBUG_FPRINTF(_LEVEL_, _MESSAGE_) {}
81 #define GLOBUS_I_GSI_CALLBACK_DEBUG_FNPRINTF(_LEVEL_, _MESSAGE_) {}
82 #define GLOBUS_I_GSI_CALLBACK_DEBUG_PRINT(_LEVEL_, _MESSAGE_) {}
83 #define GLOBUS_I_GSI_CALLBACK_DEBUG_PRINT_OBJECT(_LEVEL_, _OBJ_NAME_, _OBJ_) {}
87 #define GLOBUS_I_GSI_CALLBACK_DEBUG_ENTER \
88 GLOBUS_I_GSI_CALLBACK_DEBUG_FPRINTF( \
89 1, (globus_i_gsi_callback_debug_fstream, \
90 "%s entering\n", _function_name_))
92 #define GLOBUS_I_GSI_CALLBACK_DEBUG_EXIT \
93 GLOBUS_I_GSI_CALLBACK_DEBUG_FPRINTF( \
94 2, (globus_i_gsi_callback_debug_fstream, \
95 "%s exiting\n", _function_name_))
99 #define GLOBUS_GSI_CALLBACK_OPENSSL_ERROR_RESULT(_RESULT_, \
104 globus_common_create_string _ERRSTR_; \
105 _RESULT_ = globus_i_gsi_callback_openssl_error_result( \
112 globus_libc_free(_tmp_str_); \
115 #define GLOBUS_GSI_CALLBACK_ERROR_RESULT(_RESULT_, _ERRORTYPE_, _ERRSTR_) \
118 globus_common_create_string _ERRSTR_; \
119 _RESULT_ = globus_i_gsi_callback_error_result(_ERRORTYPE_, \
125 globus_libc_free(_tmp_str_); \
128 #define GLOBUS_GSI_CALLBACK_ERROR_CHAIN_RESULT(_TOP_RESULT_, _ERRORTYPE_) \
129 _TOP_RESULT_ = globus_i_gsi_callback_error_chain_result( \
139 #define GLOBUS_GSI_CALLBACK_OPENSSL_LONG_ERROR_RESULT(_RESULT_, \
145 globus_common_create_string _ERRSTR_; \
146 _RESULT_ = globus_i_gsi_callback_openssl_error_result( \
153 globus_libc_free(_tmp_str_); \
156 #define GLOBUS_GSI_CALLBACK_LONG_ERROR_RESULT(_RESULT_, \
162 globus_common_create_string _ERRSTR_; \
163 _RESULT_ = globus_i_gsi_callback_error_result(_ERRORTYPE_, \
169 globus_libc_free(_tmp_str_); \
172 #define GLOBUS_GSI_CALLBACK_LONG_ERROR_CHAIN_RESULT(_TOP_RESULT_, \
175 _TOP_RESULT_ = globus_i_gsi_callback_error_chain_result( \
184 extern char * globus_l_gsi_callback_error_strings[];
193 typedef struct globus_l_gsi_callback_data_s {
199 STACK_OF(X509) * cert_chain;
202 void * extension_oids;
207 } globus_i_gsi_callback_data_t;
210 globus_i_gsi_callback_check_path_length(
211 X509_STORE_CTX * x509_context,
215 globus_i_gsi_callback_check_critical_extensions(
216 X509_STORE_CTX * x509_context,
220 globus_i_gsi_callback_check_signing_policy(
221 X509_STORE_CTX * x509_context,
225 globus_i_gsi_callback_check_revoked(
226 X509_STORE_CTX * x509_context,
230 globus_i_gsi_callback_check_proxy(
231 X509_STORE_CTX * x509_context,
235 globus_i_gsi_callback_check_gaa_auth(
236 X509_STORE_CTX * x509_context,
240 globus_i_gsi_callback_cred_verify(
243 X509_STORE_CTX * x509_context);
246 globus_i_gsi_callback_openssl_error_result(
248 const char * filename,
249 const char * function_name,
251 const char * short_desc,
252 const char * long_desc);
255 globus_i_gsi_callback_error_result(
257 const char * filename,
258 const char * function_name,
260 const char * short_desc,
261 const char * long_desc);
264 globus_i_gsi_callback_error_chain_result(
267 const char * filename,
268 const char * function_name,
270 const char * short_desc,
271 const char * long_desc);
int(* globus_gsi_extension_callback_t)(globus_gsi_callback_data_t callback_data, X509_EXTENSION *extension)
Definition: globus_gsi_callback.h:128
Globus GSI Cert Utils Library.
int globus_bool_t
Boolean type.
Definition: globus_types.h:93
uint32_t globus_result_t
Definition: globus_types.h:99
enum globus_gsi_cert_utils_cert_type_e globus_gsi_cert_utils_cert_type_t
struct globus_l_gsi_callback_data_s * globus_gsi_callback_data_t
Definition: globus_gsi_callback.h:121