9 #ifndef GLOBUS_GSI_CERT_UTILS_H
10 #define GLOBUS_GSI_CERT_UTILS_H
13 #include "globus_common.h"
19 #ifndef GLOBUS_GLOBAL_DOCUMENT_SET
72 #define GLOBUS_GSI_CERT_UTILS_MODULE (&globus_i_gsi_cert_utils_module)
75 globus_module_descriptor_t globus_i_gsi_cert_utils_module;
77 #define _CUSL(s) globus_common_i18n_get_string(GLOBUS_GSI_CERT_UTILS_MODULE,\
82 #include "openssl/x509.h"
83 #include "openssl/asn1.h"
84 #include "globus_error_openssl.h"
85 #include "globus_gsi_cert_utils_constants.h"
87 #define GLOBUS_GSI_CERT_UTILS_IS_PROXY(cert_type) \
88 ((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_PROXY_MASK) != 0)
90 #define GLOBUS_GSI_CERT_UTILS_IS_RFC_PROXY(cert_type) \
91 (((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_PROXY_MASK) != 0) && \
92 ((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_RFC) != 0))
94 #define GLOBUS_GSI_CERT_UTILS_IS_GSI_3_PROXY(cert_type) \
95 (((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_PROXY_MASK) != 0) && \
96 ((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_GSI_3) != 0))
98 #define GLOBUS_GSI_CERT_UTILS_IS_GSI_2_PROXY(cert_type) \
99 (((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_PROXY_MASK) != 0) && \
100 ((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_GSI_2) != 0))
102 #define GLOBUS_GSI_CERT_UTILS_IS_INDEPENDENT_PROXY(cert_type) \
103 ((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_INDEPENDENT_PROXY) != 0)
105 #define GLOBUS_GSI_CERT_UTILS_IS_RESTRICTED_PROXY(cert_type) \
106 ((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_RESTRICTED_PROXY) != 0)
108 #define GLOBUS_GSI_CERT_UTILS_IS_LIMITED_PROXY(cert_type) \
109 ((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_LIMITED_PROXY) != 0)
111 #define GLOBUS_GSI_CERT_UTILS_IS_IMPERSONATION_PROXY(cert_type) \
112 ((cert_type & GLOBUS_GSI_CERT_UTILS_TYPE_IMPERSONATION_PROXY) != 0)
116 const ASN1_UTCTIME * ctm,
122 STACK_OF(X509) * cert_chain);
126 STACK_OF(X509) * cert_chain,
131 STACK_OF(X509) * cert_chain,
141 const char * subject_string,
143 X509_NAME * x509_name);
146 globus_i_gsi_cert_utils_dn_cmp(
152 #define globus_gsi_cert_utils_create_string \
153 globus_common_create_string
155 #define globus_gsi_cert_utils_create_nstring \
156 globus_common_create_nstring
158 #define globus_gsi_cert_utils_v_create_string \
159 globus_common_v_create_string
161 #define globus_gsi_cert_utils_v_create_nstring \
162 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:594
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:850
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:780
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:283
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:173
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:904
enum globus_gsi_cert_utils_cert_type_e globus_gsi_cert_utils_cert_type_t