17 #ifndef GLOBUS_I_ERROR_OPENSSL_H
18 #define GLOBUS_I_ERROR_OPENSSL_H
20 #ifndef GLOBUS_DONT_DOCUMENT_INTERNAL
36 extern int globus_i_gsi_openssl_error_debug_level;
38 #define GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG(_LEVEL_) \
39 (globus_i_gsi_openssl_error_debug_level >= (_LEVEL_))
41 #define GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG_FPRINTF(_LEVEL_, _MESSAGE_) \
43 if (GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG(_LEVEL_)) \
45 globus_libc_fprintf _MESSAGE_; \
50 #define GLOBUS_I_GSI_GSSAPI_DEBUG_FNPRINTF(_LEVEL_, _MESSAGE_) \
52 if (GLOBUS_I_GSI_GSSAPI_DEBUG(_LEVEL_)) \
55 globus_common_create_nstring _MESSAGE_; \
56 globus_libc_fprintf(globus_i_gsi_gssapi_debug_fstream, \
58 globus_libc_free(_tmp_str_); \
62 #define GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG_ENTER \
63 GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG_FPRINTF( \
64 1, (stderr, "%s entering\n", _function_name_))
66 #define GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG_EXIT \
67 GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG_FPRINTF( \
68 1, (stderr, "%s exiting\n", _function_name_))
72 #define GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG_FPRINTF(_LEVEL_, _MESSAGE_) {}
73 #define GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG_FNPRINTF(_LEVEL_, _MESSAGE_) {}
74 #define GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG_ENTER {}
75 #define GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG_EXIT {}
80 typedef struct globus_l_openssl_error_handle_s
82 unsigned long error_code;
83 const char * filename;
87 } globus_i_openssl_error_handle_t;
89 globus_openssl_error_handle_t
90 globus_i_openssl_error_handle_init(
void);
93 globus_i_openssl_error_handle_destroy(
94 globus_openssl_error_handle_t handle);