globus_gsi_openssl_error  3.12
 All Files Functions Groups Pages
globus_i_error_openssl.h
1 
2 #ifndef GLOBUS_I_ERROR_OPENSSL_H
3 #define GLOBUS_I_ERROR_OPENSSL_H
4 
5 #ifndef GLOBUS_DONT_DOCUMENT_INTERNAL
6 
12 #include "globus_error_openssl.h"
13 
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 
20 #ifdef BUILD_DEBUG
21 extern int globus_i_gsi_openssl_error_debug_level;
22 
23 #define GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG(_LEVEL_) \
24  (globus_i_gsi_openssl_error_debug_level >= (_LEVEL_))
25 
26 #define GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG_FPRINTF(_LEVEL_, _MESSAGE_) \
27  { \
28  if (GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG(_LEVEL_)) \
29  { \
30  globus_libc_fprintf _MESSAGE_; \
31  } \
32  }
33 
34 
35 #define GLOBUS_I_GSI_GSSAPI_DEBUG_FNPRINTF(_LEVEL_, _MESSAGE_) \
36 { \
37  if (GLOBUS_I_GSI_GSSAPI_DEBUG(_LEVEL_)) \
38  { \
39  char * _tmp_str_ = \
40  globus_common_create_nstring _MESSAGE_; \
41  globus_libc_fprintf(globus_i_gsi_gssapi_debug_fstream, \
42  _tmp_str_); \
43  globus_libc_free(_tmp_str_); \
44  } \
45 }
46 
47 #define GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG_ENTER \
48  GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG_FPRINTF( \
49  1, (stderr, "%s entering\n", _function_name_))
50 
51 #define GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG_EXIT \
52  GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG_FPRINTF( \
53  1, (stderr, "%s exiting\n", _function_name_))
54 
55 #else
56 
57 #define GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG_FPRINTF(_LEVEL_, _MESSAGE_) {}
58 #define GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG_FNPRINTF(_LEVEL_, _MESSAGE_) {}
59 #define GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG_ENTER {}
60 #define GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG_EXIT {}
61 
62 #endif
63 
64 
65 typedef struct globus_l_openssl_error_handle_s
66 {
67  unsigned long error_code;
68  const char * filename;
69  int linenumber;
70  const char * data;
71  int flags;
72 } globus_i_openssl_error_handle_t;
73 
74 globus_openssl_error_handle_t
75 globus_i_openssl_error_handle_init(void);
76 
77 void
78 globus_i_openssl_error_handle_destroy(
79  globus_openssl_error_handle_t handle);
80 
81 #ifdef __cplusplus
82 }
83 #endif
84 
85 #endif /* GLOBUS_DONT_DOCUMENT_INTERNAL */
86 
87 #endif /* GLOBUS_I_ERROR_OPENSSL_H */
Globus Generic Error.