2 #ifndef GLOBUS_DONT_DOCUMENT_INTERNAL
11 #include "proxycertinfo.h"
12 #include "globus_common.h"
14 #ifndef GLOBUS_I_GSI_PROXY_H
15 #define GLOBUS_I_GSI_PROXY_H
25 extern int globus_i_gsi_proxy_debug_level;
26 extern FILE * globus_i_gsi_proxy_debug_fstream;
28 #define GLOBUS_I_GSI_PROXY_DEBUG(_LEVEL_) \
29 (globus_i_gsi_proxy_debug_level >= (_LEVEL_))
31 #define GLOBUS_I_GSI_PROXY_DEBUG_FPRINTF(_LEVEL_, _MESSAGE_) \
33 if (GLOBUS_I_GSI_PROXY_DEBUG(_LEVEL_)) \
35 globus_libc_fprintf _MESSAGE_; \
39 #define GLOBUS_I_GSI_PROXY_DEBUG_FNPRINTF(_LEVEL_, _MESSAGE_) \
41 if (GLOBUS_I_GSI_PROXY_DEBUG(_LEVEL_)) \
44 globus_common_create_nstring _MESSAGE_; \
45 globus_libc_fprintf(globus_i_gsi_proxy_debug_fstream, \
47 globus_libc_free(_tmp_str_); \
51 #define GLOBUS_I_GSI_PROXY_DEBUG_PRINT(_LEVEL_, _MESSAGE_) \
53 if (GLOBUS_I_GSI_PROXY_DEBUG(_LEVEL_)) \
55 globus_libc_fprintf(globus_i_gsi_proxy_debug_fstream, _MESSAGE_); \
59 #define GLOBUS_I_GSI_PROXY_DEBUG_PRINT_OBJECT(_LEVEL_, _OBJ_NAME_, _OBJ_) \
61 if (GLOBUS_I_GSI_PROXY_DEBUG(_LEVEL_)) \
63 _OBJ_NAME_##_print_fp(globus_i_gsi_proxy_debug_fstream, _OBJ_); \
67 #define GLOBUS_I_GSI_PROXY_DEBUG_PRINT_PCI(_LEVEL_, _OBJ_) \
69 if (GLOBUS_I_GSI_PROXY_DEBUG(_LEVEL_)) \
71 BIO *b = BIO_new_fp(globus_i_gsi_proxy_debug_fstream, BIO_NOCLOSE); \
72 const X509V3_EXT_METHOD *meth = X509V3_EXT_get_nid(NID_proxyCertInfo); \
73 meth->i2r(meth, (_OBJ_), b, 4); \
80 #define GLOBUS_I_GSI_PROXY_DEBUG_FPRINTF(_LEVEL_, _MESSAGE_) {}
81 #define GLOBUS_I_GSI_PROXY_DEBUG_FNPRINTF(_LEVEL_, _MESSAGE_) {}
82 #define GLOBUS_I_GSI_PROXY_DEBUG_PRINT(_LEVEL_, _MESSAGE_) {}
83 #define GLOBUS_I_GSI_PROXY_DEBUG_PRINT_OBJECT(_LEVEL_, _OBJ_NAME_, _OBJ_) {}
84 #define GLOBUS_I_GSI_PROXY_DEBUG_PRINT_PCI(_LEVEL_, _OBJ_) {}
88 #define GLOBUS_I_GSI_PROXY_DEBUG_ENTER \
89 GLOBUS_I_GSI_PROXY_DEBUG_FPRINTF( \
90 1, (globus_i_gsi_proxy_debug_fstream, \
91 "%s entering\n", __func__))
93 #define GLOBUS_I_GSI_PROXY_DEBUG_EXIT \
94 GLOBUS_I_GSI_PROXY_DEBUG_FPRINTF( \
95 1, (globus_i_gsi_proxy_debug_fstream, \
96 "%s exiting\n", __func__))
100 #define GLOBUS_GSI_PROXY_OPENSSL_ERROR_RESULT(_RESULT_, \
101 _ERRORTYPE_, _ERRORSTR_) \
102 char * _tmp_string_ = \
103 globus_common_create_string _ERRORSTR_; \
104 _RESULT_ = globus_i_gsi_proxy_openssl_error_result( \
111 globus_libc_free(_tmp_string_)
113 #define GLOBUS_GSI_PROXY_ERROR_RESULT(_RESULT_, \
114 _ERRORTYPE_, _ERRORSTR_) \
115 char * _tmp_string_ = \
116 globus_common_create_string _ERRORSTR_; \
117 _RESULT_ = globus_i_gsi_proxy_error_result( \
124 globus_libc_free(_tmp_string_)
126 #define GLOBUS_GSI_PROXY_ERROR_CHAIN_RESULT(_RESULT_, \
128 _RESULT_ = globus_i_gsi_proxy_error_chain_result( \
137 #define GLOBUS_GSI_PROXY_OPENSSL_LONG_ERROR_RESULT(_RESULT_, \
141 char * _tmp_string_ = \
142 globus_common_create_string _ERRORSTR_; \
143 _RESULT_ = globus_i_gsi_proxy_openssl_error_result( \
150 globus_libc_free(_tmp_string_)
152 #define GLOBUS_GSI_PROXY_LONG_ERROR_RESULT(_RESULT_, \
156 char * _tmp_string_ = \
157 globus_common_create_string _ERRORSTR_; \
158 _RESULT_ = globus_i_gsi_proxy_error_result( \
166 globus_libc_free(_tmp_string_)
168 #define GLOBUS_GSI_PROXY_LONG_ERROR_CHAIN_RESULT(_RESULT_, \
171 _RESULT_ = globus_i_gsi_proxy_error_chain_result( \
195 typedef struct globus_l_gsi_proxy_handle_attrs_s
211 const EVP_MD * signing_algorithm;
222 void (*key_gen_callback)(int, int,
void *);
224 } globus_i_gsi_proxy_handle_attrs_t;
237 typedef struct globus_l_gsi_proxy_handle_s
242 EVP_PKEY * proxy_key;
246 PROXY_CERT_INFO_EXTENSION * proxy_cert_info;
250 globus_gsi_cert_utils_cert_type_t type;
254 STACK_OF(X509_EXTENSION)* extensions;
255 } globus_i_gsi_proxy_handle_t;
260 globus_i_gsi_proxy_create_private_key_cb(
266 globus_i_gsi_proxy_set_pc_times(
273 globus_i_gsi_proxy_set_subject(
279 globus_i_gsi_proxy_openssl_error_result(
281 const char * filename,
282 const char * function_name,
284 const char * short_desc,
285 const char * long_desc);
288 globus_i_gsi_proxy_error_result(
290 const char * filename,
291 const char * function_name,
293 const char * short_desc,
294 const char * long_desc);
297 globus_i_gsi_proxy_error_chain_result(
298 globus_result_t chain_result,
300 const char * filename,
301 const char * function_name,
303 const char * short_desc,
304 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:136