17#ifndef GLOBUS_DONT_DOCUMENT_INTERNAL
25#ifndef GLOBUS_I_GSI_CREDENTIAL_H
26#define GLOBUS_I_GSI_CREDENTIAL_H
29#include "openssl/x509v3.h"
38extern int globus_i_gsi_cred_debug_level;
39extern FILE * globus_i_gsi_cred_debug_fstream;
41#define GLOBUS_I_GSI_CRED_DEBUG(_LEVEL_) \
42 (globus_i_gsi_cred_debug_level >= (_LEVEL_))
44#define GLOBUS_I_GSI_CRED_DEBUG_FPRINTF(_LEVEL_, _MESSAGE_) \
46 if (GLOBUS_I_GSI_CRED_DEBUG(_LEVEL_)) \
48 globus_libc_fprintf _MESSAGE_; \
53#define GLOBUS_I_GSI_CRED_DEBUG_FNPRINTF(_LEVEL_, _MESSAGE_) \
55 if (GLOBUS_I_GSI_CRED_DEBUG(_LEVEL_)) \
58 globus_common_create_nstring _MESSAGE_; \
59 globus_libc_fprintf(globus_i_gsi_cred_debug_fstream, \
61 globus_libc_free(_tmp_str_); \
65#define GLOBUS_I_GSI_CRED_DEBUG_PRINT(_LEVEL_, _MESSAGE_) \
67 if (GLOBUS_I_GSI_CRED_DEBUG(_LEVEL_)) \
69 globus_libc_fprintf(globus_i_gsi_cred_debug_fstream, _MESSAGE_); \
73#define GLOBUS_I_GSI_CRED_DEBUG_PRINT_OBJECT(_LEVEL_, _OBJ_NAME_, _OBJ_) \
75 if (GLOBUS_I_GSI_CRED_DEBUG(_LEVEL_)) \
77 _OBJ_NAME_##_print_fp(globus_i_gsi_cred_debug_fstream, _OBJ_); \
83#define GLOBUS_I_GSI_CRED_DEBUG_FPRINTF(_LEVEL_, _MESSAGE_) {}
84#define GLOBUS_I_GSI_CRED_DEBUG_FNPRINTF(_LEVEL_, _MESSAGE_) {}
85#define GLOBUS_I_GSI_CRED_DEBUG_PRINT(_LEVEL_, _MESSAGE_) {}
86#define GLOBUS_I_GSI_CRED_DEBUG_PRINT_OBJECT(_LEVEL_, _OBJ_NAME_, _OBJ_) {}
90#define GLOBUS_I_GSI_CRED_DEBUG_ENTER \
91 GLOBUS_I_GSI_CRED_DEBUG_FPRINTF( \
92 2, (globus_i_gsi_cred_debug_fstream, \
93 "%s entering\n", __func__))
95#define GLOBUS_I_GSI_CRED_DEBUG_EXIT \
96 GLOBUS_I_GSI_CRED_DEBUG_FPRINTF( \
97 2, (globus_i_gsi_cred_debug_fstream, \
98 "%s exiting\n", __func__))
102#define GLOBUS_GSI_CRED_OPENSSL_ERROR_RESULT(_RESULT_, _ERRORTYPE_, _ERRSTR_) \
105 globus_common_create_string _ERRSTR_; \
106 _RESULT_ = globus_i_gsi_cred_openssl_error_result(_ERRORTYPE_, \
112 globus_libc_free(_tmp_str_); \
115#define GLOBUS_GSI_CRED_ERROR_RESULT(_RESULT_, _ERRORTYPE_, _ERRSTR_) \
118 globus_common_create_string _ERRSTR_; \
119 _RESULT_ = globus_i_gsi_cred_error_result(_ERRORTYPE_, \
125 globus_libc_free(_tmp_str_); \
128#define GLOBUS_GSI_CRED_ERROR_CHAIN_RESULT(_TOP_RESULT_, _ERRORTYPE_) \
129 _TOP_RESULT_ = globus_i_gsi_cred_error_chain_result(_TOP_RESULT_, \
137#define GLOBUS_GSI_CRED_OPENSSL_LONG_ERROR_RESULT(_RESULT_, \
143 globus_common_create_string _ERRSTR_; \
144 _RESULT_ = globus_i_gsi_cred_openssl_error_result(_ERRORTYPE_, \
150 globus_libc_free(_tmp_str_); \
153#define GLOBUS_GSI_CRED_LONG_ERROR_RESULT(_RESULT_, \
158 globus_common_create_string _ERRSTR_; \
159 _RESULT_ = globus_i_gsi_cred_error_result(_ERRORTYPE_, \
165 globus_libc_free(_tmp_str_); \
168#define GLOBUS_GSI_CRED_LONG_ERROR_CHAIN_RESULT(_TOP_RESULT_, \
171 _TOP_RESULT_ = globus_i_gsi_cred_error_chain_result(_TOP_RESULT_, \
179extern char * globus_l_gsi_cred_error_strings[];
189typedef struct globus_l_gsi_cred_handle_attrs_s
193} globus_i_gsi_cred_handle_attrs_t;
204typedef struct globus_l_gsi_cred_handle_s
211 STACK_OF(X509) * cert_chain;
216} globus_i_gsi_cred_handle_t;
220globus_i_gsi_cred_goodtill(
224globus_result_t globus_i_gsi_cred_get_proxycertinfo(
226 PROXY_CERT_INFO_EXTENSION ** proxycertinfo);
229globus_i_gsi_cred_password_callback_no_prompt(
236globus_i_gsi_cred_openssl_error_result(
238 const char * filename,
239 const char * function_name,
241 const char * short_desc,
242 const char * long_desc);
245globus_i_gsi_cred_error_result(
247 const char * filename,
248 const char * function_name,
250 const char * short_desc,
251 const char * long_desc);
254globus_i_gsi_cred_error_chain_result(
255 globus_result_t chain_result,
257 const char * filename,
258 const char * function_name,
260 const char * short_desc,
261 const char * long_desc);
264globus_i_gsi_cred_error_join_chains_result(
265 globus_result_t outter_error,
266 globus_result_t inner_error);
Globus GSI Credential Library.
struct globus_l_gsi_cred_handle_attrs_s * globus_gsi_cred_handle_attrs_t
Definition globus_gsi_credential.h:175
struct globus_l_gsi_cred_handle_s * globus_gsi_cred_handle_t
Definition globus_gsi_credential.h:162
globus_gsi_cred_type_t
Definition globus_gsi_cred_constants.h:105