17 #ifndef GLOBUS_DONT_DOCUMENT_INTERNAL
24 #ifndef GLOBUS_I_GSI_CERT_UTILS_H
25 #define GLOBUS_I_GSI_CERT_UTILS_H
33 extern int globus_i_gsi_cert_utils_debug_level;
34 extern FILE * globus_i_gsi_cert_utils_debug_fstream;
36 #define GLOBUS_I_GSI_CERT_UTILS_DEBUG(_LEVEL_) \
37 (globus_i_gsi_cert_utils_debug_level >= (_LEVEL_))
39 #define GLOBUS_I_GSI_CERT_UTILS_DEBUG_FPRINTF(_LEVEL_, _MESSAGE_) \
41 if (GLOBUS_I_GSI_CERT_UTILS_DEBUG(_LEVEL_)) \
43 globus_libc_fprintf _MESSAGE_; \
47 #define GLOBUS_I_GSI_CERT_UTILS_DEBUG_FNPRINTF(_LEVEL_, _MESSAGE_) \
49 if (GLOBUS_I_GSI_CERT_UTILS_DEBUG(_LEVEL_)) \
52 globus_common_create_nstring _MESSAGE_; \
53 globus_libc_fprintf(globus_i_gsi_cert_utils_debug_fstream, \
55 globus_libc_free(_tmp_str_); \
59 #define GLOBUS_I_GSI_CERT_UTILS_DEBUG_PRINT(_LEVEL_, _MESSAGE_) \
61 if (GLOBUS_I_GSI_CERT_UTILS_DEBUG(_LEVEL_)) \
63 globus_libc_fprintf(globus_i_gsi_cert_utils_debug_fstream, \
68 #define GLOBUS_I_GSI_CERT_UTILS_DEBUG_PRINT_OBJECT(_LEVEL_, \
72 if (GLOBUS_I_GSI_CERT_UTILS_DEBUG(_LEVEL_)) \
74 _OBJ_NAME_##_print_fp(globus_i_gsi_cert_utils_debug_fstream, \
81 #define GLOBUS_I_GSI_CERT_UTILS_DEBUG_FPRINTF(_LEVEL_, _MESSAGE_) {}
82 #define GLOBUS_I_GSI_CERT_UTILS_DEBUG_FNPRINTF(_LEVEL_, _MESSAGE_) {}
83 #define GLOBUS_I_GSI_CERT_UTILS_DEBUG_PRINT(_LEVEL_, _MESSAGE_) {}
84 #define GLOBUS_I_GSI_CERT_UTILS_DEBUG_PRINT_OBJECT(_LEVEL_, \
89 #define GLOBUS_I_GSI_CERT_UTILS_DEBUG_ENTER \
90 GLOBUS_I_GSI_CERT_UTILS_DEBUG_FPRINTF( \
91 1, (globus_i_gsi_cert_utils_debug_fstream, \
92 "%s entering\n", _function_name_))
94 #define GLOBUS_I_GSI_CERT_UTILS_DEBUG_EXIT \
95 GLOBUS_I_GSI_CERT_UTILS_DEBUG_FPRINTF( \
96 2, (globus_i_gsi_cert_utils_debug_fstream, \
97 "%s exiting\n", _function_name_))
101 extern char * globus_l_gsi_cert_utils_error_strings[];
103 #define GLOBUS_GSI_CERT_UTILS_OPENSSL_ERROR_RESULT(_RESULT_, \
104 _ERRORTYPE_, _ERRSTR_) \
107 globus_common_create_string _ERRSTR_; \
108 _RESULT_ = globus_i_gsi_cert_utils_openssl_error_result(_ERRORTYPE_, \
114 globus_libc_free(_tmp_str_); \
117 #define GLOBUS_GSI_CERT_UTILS_ERROR_RESULT(_RESULT_, _ERRORTYPE_, _ERRSTR_) \
120 globus_common_create_string _ERRSTR_; \
121 _RESULT_ = globus_i_gsi_cert_utils_error_result(_ERRORTYPE_, \
127 globus_libc_free(_tmp_str_); \
130 #define GLOBUS_GSI_CERT_UTILS_ERROR_CHAIN_RESULT(_TOP_RESULT_, _ERRORTYPE_) \
131 _TOP_RESULT_ = globus_i_gsi_cert_utils_error_chain_result(_TOP_RESULT_, \
139 #define GLOBUS_GSI_CERT_UTILS_OPENSSL_LONG_ERROR_RESULT(_RESULT_, \
145 globus_common_create_string _ERRSTR_; \
146 _RESULT_ = globus_i_gsi_cert_utils_openssl_error_result( \
153 globus_libc_free(_tmp_str_); \
156 #define GLOBUS_GSI_CERT_UTILS_LONG_ERROR_RESULT(_RESULT_, \
162 globus_common_create_string _ERRSTR_; \
163 _RESULT_ = globus_i_gsi_cert_utils_error_result(_ERRORTYPE_, \
169 globus_libc_free(_tmp_str_); \
172 #define GLOBUS_GSI_CERT_UTILS_LONG_ERROR_CHAIN_RESULT(_TOP_RESULT_, \
175 _TOP_RESULT_ = globus_i_gsi_cert_utils_error_chain_result(_TOP_RESULT_, \
183 #define GLOBUS_GSI_CERT_UTILS_MALLOC_ERROR(_MIN_RESULT_) \
186 globus_l_gsi_cert_utils_error_strings[ \
187 GLOBUS_GSI_CERT_UTILS_ERROR_OUT_OF_MEMORY]; \
188 _MIN_RESULT_ = globus_error_put( \
189 globus_error_wrap_errno_error( \
190 GLOBUS_GSI_CERT_UTILS_MODULE, \
192 GLOBUS_GSI_CERT_UTILS_ERROR_OUT_OF_MEMORY, \
201 globus_i_gsi_cert_utils_openssl_error_result(
203 const char * filename,
204 const char * function_name,
206 const char * short_desc,
207 const char * long_desc);
210 globus_i_gsi_cert_utils_error_result(
212 const char * filename,
213 const char * function_name,
215 const char * short_desc,
216 const char * long_desc);
219 globus_i_gsi_cert_utils_error_chain_result(
222 const char * filename,
223 const char * function_name,
225 const char * short_desc,
226 const char * long_desc);
Globus GSI Cert Utils Library.
uint32_t globus_result_t
Definition: globus_types.h:99