2 #ifndef GLOBUS_DONT_DOCUMENT_INTERNAL
10 #ifndef GLOBUS_I_GSI_SYSTEM_CONFIG_H
11 #define GLOBUS_I_GSI_SYSTEM_CONFIG_H
13 #include "globus_common.h"
14 #include "globus_i_gsi_sysconfig_config.h"
18 #define _GSSL(s) globus_common_i18n_get_string(\
19 GLOBUS_GSI_SYSCONFIG_MODULE,\
24 extern int globus_i_gsi_sysconfig_debug_level;
25 extern FILE * globus_i_gsi_sysconfig_debug_fstream;
29 #define GLOBUS_I_GSI_SYSCONFIG_DEBUG(_LEVEL_) \
30 (globus_i_gsi_sysconfig_debug_level >= (_LEVEL_))
32 #define GLOBUS_I_GSI_SYSCONFIG_DEBUG_FPRINTF(_LEVEL_, _MESSAGE_) \
34 if (GLOBUS_I_GSI_SYSCONFIG_DEBUG(_LEVEL_)) \
36 globus_libc_fprintf _MESSAGE_; \
40 #define GLOBUS_I_GSI_SYSCONFIG_DEBUG_FNPRINTF(_LEVEL_, _MESSAGE_) \
42 if (GLOBUS_I_GSI_SYSCONFIG_DEBUG(_LEVEL_)) \
45 globus_common_create_nstring _MESSAGE_; \
46 globus_libc_fprintf(globus_i_gsi_sysconfig_debug_fstream, \
48 globus_libc_free(_tmp_str_); \
52 #define GLOBUS_I_GSI_SYSCONFIG_DEBUG_PRINT(_LEVEL_, _MESSAGE_) \
54 if (GLOBUS_I_GSI_SYSCONFIG_DEBUG(_LEVEL_)) \
56 globus_libc_fprintf(globus_i_gsi_sysconfig_debug_fstream, \
61 #define GLOBUS_I_GSI_SYSCONFIG_DEBUG_PRINT_OBJECT(_LEVEL_, _OBJ_NAME_, _OBJ_) \
63 if (GLOBUS_I_GSI_SYSCONFIG_DEBUG(_LEVEL_)) \
65 _OBJ_NAME_##_print_fp(globus_i_gsi_sysconfig_debug_fstream, \
72 #define GLOBUS_I_GSI_SYSCONFIG_DEBUG_FPRINTF(_LEVEL_, _MESSAGE_) {}
73 #define GLOBUS_I_GSI_SYSCONFIG_DEBUG_FNPRINTF(_LEVEL_, _MESSAGE_) {}
74 #define GLOBUS_I_GSI_SYSCONFIG_DEBUG_PRINT(_LEVEL_, _MESSAGE_) {}
75 #define GLOBUS_I_GSI_SYSCONFIG_DEBUG_PRINT_OBJECT(_LEVEL_, \
80 #define GLOBUS_I_GSI_SYSCONFIG_DEBUG_ENTER \
81 GLOBUS_I_GSI_SYSCONFIG_DEBUG_FPRINTF( \
82 1, (globus_i_gsi_sysconfig_debug_fstream, \
83 "%s entering\n", __func__))
85 #define GLOBUS_I_GSI_SYSCONFIG_DEBUG_EXIT \
86 GLOBUS_I_GSI_SYSCONFIG_DEBUG_FPRINTF( \
87 2, (globus_i_gsi_sysconfig_debug_fstream, \
88 "%s exiting\n", __func__))
92 #define GLOBUS_GSI_SYSCONFIG_OPENSSL_ERROR_RESULT(_RESULT_, \
97 globus_common_create_string _ERRSTR_; \
98 _RESULT_ = globus_i_gsi_sysconfig_openssl_error_result(_ERRORTYPE_, \
104 globus_libc_free(_tmp_str_); \
107 #define GLOBUS_GSI_SYSCONFIG_ERROR_RESULT(_RESULT_, _ERRORTYPE_, _ERRSTR_) \
110 globus_common_create_string _ERRSTR_; \
111 _RESULT_ = globus_i_gsi_sysconfig_error_result(_ERRORTYPE_, \
117 globus_libc_free(_tmp_str_); \
120 #define GLOBUS_GSI_SYSCONFIG_ERROR_CHAIN_RESULT(_TOP_RESULT_, _ERRORTYPE_) \
121 _TOP_RESULT_ = globus_i_gsi_sysconfig_error_chain_result(_TOP_RESULT_, \
129 #define GLOBUS_GSI_SYSCONFIG_OPENSSL_LONG_ERROR_RESULT(_RESULT_, \
135 globus_common_create_string _ERRSTR_; \
136 _RESULT_ = globus_i_gsi_sysconfig_openssl_error_result(_ERRORTYPE_, \
142 globus_libc_free(_tmp_str_); \
145 #define GLOBUS_GSI_SYSCONFIG_LONG_ERROR_RESULT(_RESULT_, \
151 globus_common_create_string _ERRSTR_; \
152 _RESULT_ = globus_i_gsi_sysconfig_error_result(_ERRORTYPE_, \
158 globus_libc_free(_tmp_str_); \
161 #define GLOBUS_GSI_SYSCONFIG_LONG_ERROR_CHAIN_RESULT(_TOP_RESULT_, \
164 _TOP_RESULT_ = globus_i_gsi_sysconfig_error_chain_result(_TOP_RESULT_, \
172 #define GLOBUS_GSI_SYSCONFIG_FILE_DOES_NOT_EXIST(_RESULT) \
173 (globus_error_match(globus_error_peek(_RESULT), \
174 GLOBUS_GSI_SYSCONFIG_MODULE, \
175 GLOBUS_GSI_SYSCONFIG_ERROR_FILE_DOES_NOT_EXIST) == \
178 #define GLOBUS_GSI_SYSCONFIG_FILE_HAS_BAD_PERMISSIONS(_RESULT) \
179 (globus_error_match(globus_error_peek(_RESULT), \
180 GLOBUS_GSI_SYSCONFIG_MODULE, \
181 GLOBUS_GSI_SYSCONFIG_ERROR_FILE_BAD_PERMISSIONS) == \
184 #define GLOBUS_GSI_SYSCONFIG_FILE_ZERO_LENGTH(_RESULT) \
185 (globus_error_match(globus_error_peek(_RESULT), \
186 GLOBUS_GSI_SYSCONFIG_MODULE, \
187 GLOBUS_GSI_SYSCONFIG_ERROR_FILE_ZERO_LENGTH) == \
190 extern char * globus_l_gsi_sysconfig_error_strings[];
191 extern char * globus_l_gsi_sysconfig_status_strings[];
194 globus_i_gsi_sysconfig_create_cert_dir_string(
196 char ** cert_dir_value,
201 globus_i_gsi_sysconfig_create_cert_string(
203 char ** cert_string_value,
208 globus_i_gsi_sysconfig_create_key_string(
210 char ** key_string_value,
215 globus_i_gsi_sysconfig_error_chain_result(
216 globus_result_t chain_result,
218 const char * filename,
219 const char * function_name,
221 const char * short_desc,
222 const char * long_desc);
225 globus_i_gsi_sysconfig_error_result(
227 const char * filename,
228 const char * function_name,
230 const char * short_desc,
231 const char * long_desc);
234 globus_i_gsi_sysconfig_openssl_error_result(
236 const char * filename,
237 const char * function_name,
239 const char * short_desc,
240 const char * long_desc);
Globus GSI System Config Library.
Globus GSI System Config Library.