00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00024 #ifndef GLOBUS_GSI_CERT_UTILS_H
00025 #define GLOBUS_GSI_CERT_UTILS_H
00026
00027
00028 #include "globus_common.h"
00029
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif
00033
00034 #ifndef GLOBUS_GLOBAL_DOCUMENT_SET
00035
00039 #endif
00040
00089 #define GLOBUS_GSI_CERT_UTILS_MODULE (&globus_i_gsi_cert_utils_module)
00090
00091 extern
00092 globus_module_descriptor_t globus_i_gsi_cert_utils_module;
00093
00094 #define _CUSL(s) globus_common_i18n_get_string(GLOBUS_GSI_CERT_UTILS_MODULE,\
00095 s)
00096
00097 #ifndef DOXYGEN
00098
00099 #include "openssl/x509.h"
00100 #include "openssl/asn1.h"
00101 #include "globus_error_openssl.h"
00102 #include "globus_gsi_cert_utils_constants.h"
00103
00104 #define GLOBUS_GSI_CERT_UTILS_IS_PROXY(cert_type) \
00105 ((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_PROXY_MASK) != 0)
00106
00107 #define GLOBUS_GSI_CERT_UTILS_IS_RFC_PROXY(cert_type) \
00108 (((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_PROXY_MASK) != 0) && \
00109 ((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_RFC) != 0))
00110
00111 #define GLOBUS_GSI_CERT_UTILS_IS_GSI_3_PROXY(cert_type) \
00112 (((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_PROXY_MASK) != 0) && \
00113 ((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_GSI_3) != 0))
00114
00115 #define GLOBUS_GSI_CERT_UTILS_IS_GSI_2_PROXY(cert_type) \
00116 (((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_PROXY_MASK) != 0) && \
00117 ((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_GSI_2) != 0))
00118
00119 #define GLOBUS_GSI_CERT_UTILS_IS_INDEPENDENT_PROXY(cert_type) \
00120 ((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_INDEPENDENT_PROXY) != 0)
00121
00122 #define GLOBUS_GSI_CERT_UTILS_IS_RESTRICTED_PROXY(cert_type) \
00123 ((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_RESTRICTED_PROXY) != 0)
00124
00125 #define GLOBUS_GSI_CERT_UTILS_IS_LIMITED_PROXY(cert_type) \
00126 ((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_LIMITED_PROXY) != 0)
00127
00128 #define GLOBUS_GSI_CERT_UTILS_IS_IMPERSONATION_PROXY(cert_type) \
00129 ((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_IMPERSONATION_PROXY) != 0)
00130
00131 globus_result_t
00132 globus_gsi_cert_utils_make_time(
00133 const ASN1_UTCTIME * ctm,
00134 time_t * newtime);
00135
00136 globus_result_t
00137 globus_gsi_cert_utils_get_base_name(
00138 X509_NAME * subject,
00139 STACK_OF(X509) * cert_chain);
00140
00141 globus_result_t
00142 globus_gsi_cert_utils_get_eec(
00143 STACK_OF(X509) * cert_chain,
00144 X509 ** eec);
00145
00146 globus_result_t
00147 globus_gsi_cert_utils_get_identity_cert(
00148 STACK_OF(X509) * cert_chain,
00149 X509 ** eec);
00150
00151 globus_result_t
00152 globus_gsi_cert_utils_get_cert_type(
00153 X509 * cert,
00154 globus_gsi_cert_utils_cert_type_t * type);
00155
00156 globus_result_t
00157 globus_gsi_cert_utils_get_x509_name(
00158 const char * subject_string,
00159 int length,
00160 X509_NAME * x509_name);
00161
00162 int
00163 globus_i_gsi_cert_utils_dn_cmp(
00164 const char * dn1,
00165 const char * dn2);
00166
00167
00168
00169 #define globus_gsi_cert_utils_create_string \
00170 globus_common_create_string
00171
00172 #define globus_gsi_cert_utils_create_nstring \
00173 globus_common_create_nstring
00174
00175 #define globus_gsi_cert_utils_v_create_string \
00176 globus_common_v_create_string
00177
00178 #define globus_gsi_cert_utils_v_create_nstring \
00179 globus_common_v_create_nstring
00180
00181 #endif
00182
00183 #ifdef __cplusplus
00184 }
00185 #endif
00186
00187 #endif