17 #ifndef GLOBUS_DONT_DOCUMENT_INTERNAL
26 #include "proxycertinfo.h"
27 #include "globus_common.h"
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_); \
84 #define GLOBUS_I_GSI_PROXY_DEBUG_FPRINTF(_LEVEL_, _MESSAGE_) {}
85 #define GLOBUS_I_GSI_PROXY_DEBUG_FNPRINTF(_LEVEL_, _MESSAGE_) {}
86 #define GLOBUS_I_GSI_PROXY_DEBUG_PRINT(_LEVEL_, _MESSAGE_) {}
87 #define GLOBUS_I_GSI_PROXY_DEBUG_PRINT_OBJECT(_LEVEL_, _OBJ_NAME_, _OBJ_) {}
91 #define GLOBUS_I_GSI_PROXY_DEBUG_ENTER \
92 GLOBUS_I_GSI_PROXY_DEBUG_FPRINTF( \
93 1, (globus_i_gsi_proxy_debug_fstream, \
94 "%s entering\n", _function_name_))
96 #define GLOBUS_I_GSI_PROXY_DEBUG_EXIT \
97 GLOBUS_I_GSI_PROXY_DEBUG_FPRINTF( \
98 1, (globus_i_gsi_proxy_debug_fstream, \
99 "%s exiting\n", _function_name_))
103 #define GLOBUS_GSI_PROXY_OPENSSL_ERROR_RESULT(_RESULT_, \
104 _ERRORTYPE_, _ERRORSTR_) \
105 char * _tmp_string_ = \
106 globus_common_create_string _ERRORSTR_; \
107 _RESULT_ = globus_i_gsi_proxy_openssl_error_result( \
114 globus_libc_free(_tmp_string_)
116 #define GLOBUS_GSI_PROXY_ERROR_RESULT(_RESULT_, \
117 _ERRORTYPE_, _ERRORSTR_) \
118 char * _tmp_string_ = \
119 globus_common_create_string _ERRORSTR_; \
120 _RESULT_ = globus_i_gsi_proxy_error_result( \
127 globus_libc_free(_tmp_string_)
129 #define GLOBUS_GSI_PROXY_ERROR_CHAIN_RESULT(_RESULT_, \
131 _RESULT_ = globus_i_gsi_proxy_error_chain_result( \
140 #define GLOBUS_GSI_PROXY_OPENSSL_LONG_ERROR_RESULT(_RESULT_, \
144 char * _tmp_string_ = \
145 globus_common_create_string _ERRORSTR_; \
146 _RESULT_ = globus_i_gsi_proxy_openssl_error_result( \
153 globus_libc_free(_tmp_string_)
155 #define GLOBUS_GSI_PROXY_LONG_ERROR_RESULT(_RESULT_, \
159 char * _tmp_string_ = \
160 globus_common_create_string _ERRORSTR_; \
161 _RESULT_ = globus_i_gsi_proxy_error_result( \
169 globus_libc_free(_tmp_string_)
171 #define GLOBUS_GSI_PROXY_LONG_ERROR_CHAIN_RESULT(_RESULT_, \
174 _RESULT_ = globus_i_gsi_proxy_error_chain_result( \
198 typedef struct globus_l_gsi_proxy_handle_attrs_s
214 EVP_MD * signing_algorithm;
225 void (*key_gen_callback)(int, int,
void *);
227 } globus_i_gsi_proxy_handle_attrs_t;
240 typedef struct globus_l_gsi_proxy_handle_s
245 EVP_PKEY * proxy_key;
249 PROXYCERTINFO * proxy_cert_info;
253 globus_gsi_cert_utils_cert_type_t type;
257 STACK_OF(X509_EXTENSION)* extensions;
258 } globus_i_gsi_proxy_handle_t;
263 globus_i_gsi_proxy_create_private_key_cb(
269 globus_i_gsi_proxy_set_pc_times(
276 globus_i_gsi_proxy_set_subject(
282 globus_i_gsi_proxy_openssl_error_result(
284 const char * filename,
285 const char * function_name,
287 const char * short_desc,
288 const char * long_desc);
291 globus_i_gsi_proxy_error_result(
293 const char * filename,
294 const char * function_name,
296 const char * short_desc,
297 const char * long_desc);
300 globus_i_gsi_proxy_error_chain_result(
301 globus_result_t chain_result,
303 const char * filename,
304 const char * function_name,
306 const char * short_desc,
307 const char * long_desc);