17 #ifndef GLOBUS_DONT_DOCUMENT_INTERNAL
29 #ifndef GLOBUS_I_GSI_PROXY_H
30 #define GLOBUS_I_GSI_PROXY_H
40 extern int globus_i_gsi_proxy_debug_level;
41 extern FILE * globus_i_gsi_proxy_debug_fstream;
43 #define GLOBUS_I_GSI_PROXY_DEBUG(_LEVEL_) \
44 (globus_i_gsi_proxy_debug_level >= (_LEVEL_))
46 #define GLOBUS_I_GSI_PROXY_DEBUG_FPRINTF(_LEVEL_, _MESSAGE_) \
48 if (GLOBUS_I_GSI_PROXY_DEBUG(_LEVEL_)) \
50 globus_libc_fprintf _MESSAGE_; \
54 #define GLOBUS_I_GSI_PROXY_DEBUG_FNPRINTF(_LEVEL_, _MESSAGE_) \
56 if (GLOBUS_I_GSI_PROXY_DEBUG(_LEVEL_)) \
59 globus_common_create_nstring _MESSAGE_; \
60 globus_libc_fprintf(globus_i_gsi_proxy_debug_fstream, \
62 globus_libc_free(_tmp_str_); \
66 #define GLOBUS_I_GSI_PROXY_DEBUG_PRINT(_LEVEL_, _MESSAGE_) \
68 if (GLOBUS_I_GSI_PROXY_DEBUG(_LEVEL_)) \
70 globus_libc_fprintf(globus_i_gsi_proxy_debug_fstream, _MESSAGE_); \
74 #define GLOBUS_I_GSI_PROXY_DEBUG_PRINT_OBJECT(_LEVEL_, _OBJ_NAME_, _OBJ_) \
76 if (GLOBUS_I_GSI_PROXY_DEBUG(_LEVEL_)) \
78 _OBJ_NAME_##_print_fp(globus_i_gsi_proxy_debug_fstream, _OBJ_); \
82 #define GLOBUS_I_GSI_PROXY_DEBUG_PRINT_PCI(_LEVEL_, _OBJ_) \
84 if (GLOBUS_I_GSI_PROXY_DEBUG(_LEVEL_)) \
86 BIO *b = BIO_new_fp(globus_i_gsi_proxy_debug_fstream, BIO_NOCLOSE); \
87 const X509V3_EXT_METHOD *meth = X509V3_EXT_get_nid(NID_proxyCertInfo); \
88 meth->i2r(meth, (_OBJ_), b, 4); \
95 #define GLOBUS_I_GSI_PROXY_DEBUG_FPRINTF(_LEVEL_, _MESSAGE_) {}
96 #define GLOBUS_I_GSI_PROXY_DEBUG_FNPRINTF(_LEVEL_, _MESSAGE_) {}
97 #define GLOBUS_I_GSI_PROXY_DEBUG_PRINT(_LEVEL_, _MESSAGE_) {}
98 #define GLOBUS_I_GSI_PROXY_DEBUG_PRINT_OBJECT(_LEVEL_, _OBJ_NAME_, _OBJ_) {}
99 #define GLOBUS_I_GSI_PROXY_DEBUG_PRINT_PCI(_LEVEL_, _OBJ_) {}
103 #define GLOBUS_I_GSI_PROXY_DEBUG_ENTER \
104 GLOBUS_I_GSI_PROXY_DEBUG_FPRINTF( \
105 1, (globus_i_gsi_proxy_debug_fstream, \
106 "%s entering\n", __func__))
108 #define GLOBUS_I_GSI_PROXY_DEBUG_EXIT \
109 GLOBUS_I_GSI_PROXY_DEBUG_FPRINTF( \
110 1, (globus_i_gsi_proxy_debug_fstream, \
111 "%s exiting\n", __func__))
115 #define GLOBUS_GSI_PROXY_OPENSSL_ERROR_RESULT(_RESULT_, \
116 _ERRORTYPE_, _ERRORSTR_) \
117 char * _tmp_string_ = \
118 globus_common_create_string _ERRORSTR_; \
119 _RESULT_ = globus_i_gsi_proxy_openssl_error_result( \
126 globus_libc_free(_tmp_string_)
128 #define GLOBUS_GSI_PROXY_ERROR_RESULT(_RESULT_, \
129 _ERRORTYPE_, _ERRORSTR_) \
130 char * _tmp_string_ = \
131 globus_common_create_string _ERRORSTR_; \
132 _RESULT_ = globus_i_gsi_proxy_error_result( \
139 globus_libc_free(_tmp_string_)
141 #define GLOBUS_GSI_PROXY_ERROR_CHAIN_RESULT(_RESULT_, \
143 _RESULT_ = globus_i_gsi_proxy_error_chain_result( \
152 #define GLOBUS_GSI_PROXY_OPENSSL_LONG_ERROR_RESULT(_RESULT_, \
156 char * _tmp_string_ = \
157 globus_common_create_string _ERRORSTR_; \
158 _RESULT_ = globus_i_gsi_proxy_openssl_error_result( \
165 globus_libc_free(_tmp_string_)
167 #define GLOBUS_GSI_PROXY_LONG_ERROR_RESULT(_RESULT_, \
171 char * _tmp_string_ = \
172 globus_common_create_string _ERRORSTR_; \
173 _RESULT_ = globus_i_gsi_proxy_error_result( \
181 globus_libc_free(_tmp_string_)
183 #define GLOBUS_GSI_PROXY_LONG_ERROR_CHAIN_RESULT(_RESULT_, \
186 _RESULT_ = globus_i_gsi_proxy_error_chain_result( \
210 typedef struct globus_l_gsi_proxy_handle_attrs_s
226 const EVP_MD * signing_algorithm;
237 void (*key_gen_callback)(int, int,
void *);
239 } globus_i_gsi_proxy_handle_attrs_t;
252 typedef struct globus_l_gsi_proxy_handle_s
257 EVP_PKEY * proxy_key;
261 PROXY_CERT_INFO_EXTENSION * proxy_cert_info;
269 STACK_OF(X509_EXTENSION)* extensions;
270 } globus_i_gsi_proxy_handle_t;
275 globus_i_gsi_proxy_create_private_key_cb(
281 globus_i_gsi_proxy_set_pc_times(
288 globus_i_gsi_proxy_set_subject(
294 globus_i_gsi_proxy_openssl_error_result(
296 const char * filename,
297 const char * function_name,
299 const char * short_desc,
300 const char * long_desc);
303 globus_i_gsi_proxy_error_result(
305 const char * filename,
306 const char * function_name,
308 const char * short_desc,
309 const char * long_desc);
312 globus_i_gsi_proxy_error_chain_result(
315 const char * filename,
316 const char * function_name,
318 const char * short_desc,
319 const char * long_desc);
struct globus_l_gsi_proxy_handle_attrs_s * globus_gsi_proxy_handle_attrs_t
Handle Attributes.
Definition: globus_gsi_proxy.h:153
Headers common to all of Globus.
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