24 #ifndef GLOBUS_GSI_CERT_UTILS_H
25 #define GLOBUS_GSI_CERT_UTILS_H
28 #include "globus_common.h"
34 #ifndef GLOBUS_GLOBAL_DOCUMENT_SET
87 #define GLOBUS_GSI_CERT_UTILS_MODULE (&globus_i_gsi_cert_utils_module)
90 globus_module_descriptor_t globus_i_gsi_cert_utils_module;
92 #define _CUSL(s) globus_common_i18n_get_string(GLOBUS_GSI_CERT_UTILS_MODULE,\
97 #include "openssl/x509.h"
98 #include "openssl/asn1.h"
99 #include "globus_error_openssl.h"
100 #include "globus_gsi_cert_utils_constants.h"
102 #define GLOBUS_GSI_CERT_UTILS_IS_PROXY(cert_type) \
103 ((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_PROXY_MASK) != 0)
105 #define GLOBUS_GSI_CERT_UTILS_IS_RFC_PROXY(cert_type) \
106 (((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_PROXY_MASK) != 0) && \
107 ((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_RFC) != 0))
109 #define GLOBUS_GSI_CERT_UTILS_IS_GSI_3_PROXY(cert_type) \
110 (((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_PROXY_MASK) != 0) && \
111 ((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_GSI_3) != 0))
113 #define GLOBUS_GSI_CERT_UTILS_IS_GSI_2_PROXY(cert_type) \
114 (((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_PROXY_MASK) != 0) && \
115 ((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_GSI_2) != 0))
117 #define GLOBUS_GSI_CERT_UTILS_IS_INDEPENDENT_PROXY(cert_type) \
118 ((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_INDEPENDENT_PROXY) != 0)
120 #define GLOBUS_GSI_CERT_UTILS_IS_RESTRICTED_PROXY(cert_type) \
121 ((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_RESTRICTED_PROXY) != 0)
123 #define GLOBUS_GSI_CERT_UTILS_IS_LIMITED_PROXY(cert_type) \
124 ((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_LIMITED_PROXY) != 0)
126 #define GLOBUS_GSI_CERT_UTILS_IS_IMPERSONATION_PROXY(cert_type) \
127 ((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_IMPERSONATION_PROXY) != 0)
131 const ASN1_UTCTIME * ctm,
137 STACK_OF(X509) * cert_chain);
141 STACK_OF(X509) * cert_chain,
146 STACK_OF(X509) * cert_chain,
156 const char * subject_string,
158 X509_NAME * x509_name);
161 globus_i_gsi_cert_utils_dn_cmp(
167 #define globus_gsi_cert_utils_create_string \
168 globus_common_create_string
170 #define globus_gsi_cert_utils_create_nstring \
171 globus_common_create_nstring
173 #define globus_gsi_cert_utils_v_create_string \
174 globus_common_v_create_string
176 #define globus_gsi_cert_utils_v_create_nstring \
177 globus_common_v_create_nstring
globus_result_t globus_gsi_cert_utils_get_x509_name(const char *subject_string, int length, X509_NAME *x509_name)
Get the certificate name.
Definition: globus_gsi_cert_utils.c:609
globus_result_t globus_gsi_cert_utils_get_eec(STACK_OF(X509)*cert_chain, X509 **eec)
Get the end-entity certificate from a certificate chain.
Definition: globus_gsi_cert_utils.c:865
globus_result_t globus_gsi_cert_utils_get_base_name(X509_NAME *subject, STACK_OF(X509)*cert_chain)
Get the base certificate name from a certificate chain.
Definition: globus_gsi_cert_utils.c:795
globus_result_t globus_gsi_cert_utils_get_cert_type(X509 *cert, globus_gsi_cert_utils_cert_type_t *type)
Get the X509 certificate type.
Definition: globus_gsi_cert_utils.c:298
globus_result_t globus_gsi_cert_utils_make_time(const ASN1_UTCTIME *ctm, time_t *newtime)
Convert ASN1_UTCTIME to time_t.
Definition: globus_gsi_cert_utils.c:188
globus_result_t globus_gsi_cert_utils_get_identity_cert(STACK_OF(X509)*cert_chain, X509 **identity_cert)
Get the identity certificate from a certificate chain.
Definition: globus_gsi_cert_utils.c:919
enum globus_gsi_cert_utils_cert_type_e globus_gsi_cert_utils_cert_type_t