proxycertinfo.h

Go to the documentation of this file.
00001 /*
00002  * Copyright 1999-2006 University of Chicago
00003  * 
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  * 
00008  * http://www.apache.org/licenses/LICENSE-2.0
00009  * 
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef HEADER_PROXYCERTINFO_H
00018 #define HEADER_PROXYCERTINFO_H
00019 
00026 #ifndef GLOBUS_GLOBAL_DOCUMENT_SET
00027 
00031 #endif
00032 
00057 #include "proxypolicy.h"
00058 #include <openssl/asn1.h>
00059 #include <openssl/x509.h>
00060 #include <openssl/x509v3.h>
00061 #include <string.h>
00062 
00063 #ifdef __cplusplus
00064 extern "C" {
00065 #endif
00066 
00075 #define PROXYCERTINFO_OLD_OID           "1.3.6.1.4.1.3536.1.222"
00076 #define PROXYCERTINFO_OID               "1.3.6.1.5.5.7.1.14"
00077 #define PROXYCERTINFO_SN                "PROXYCERTINFO"
00078 #define PROXYCERTINFO_LN                "Proxy Certificate Info Extension"
00079 #define PROXYCERTINFO_OLD_SN            "OLD_PROXYCERTINFO"
00080 #define PROXYCERTINFO_OLD_LN                "Proxy Certificate Info Extension (old OID)"
00081 
00082 /*
00083  * Used for error checking
00084  */
00085 #define ASN1_F_PROXYCERTINFO_NEW                         430
00086 #define ASN1_F_D2I_PROXYCERTINFO                         431
00087 
00088 #ifndef GLOBUS_DEPRECATED
00089 #define GLOBUS_DEPRECATED_IN_PROXYCERTINFO_H
00090 #if __GNUC__
00091 #   define GLOBUS_DEPRECATED(func) func __attribute__((deprecated))
00092 #elif defined(_MSC_VER)
00093 #   define GLOBUS_DEPRECATED(func)  __declspec(deprecated) func
00094 #else
00095 #   define GLOBUS_DEPRECATED(func) func
00096 #endif
00097 #endif
00098 
00099 /*
00100  * The PROXYCERTINFO functions are deprecated, as OpenSSL has provided
00101  * its own data structure since 0.9.8.
00102  */
00103 /* data structures */
00104 
00122 struct PROXYCERTINFO_st
00123 {
00124     ASN1_INTEGER *                      path_length;       /* [ OPTIONAL ] */
00125     PROXYPOLICY *                       policy;
00126 };
00127 
00128 typedef struct PROXYCERTINFO_st PROXYCERTINFO;
00129 
00130 #ifdef DECLARE_STACK_OF
00131 DECLARE_STACK_OF(PROXYCERTINFO)
00132 #endif
00133 
00134 DECLARE_ASN1_FUNCTIONS(PROXYCERTINFO)
00135 
00136 /* macros */
00137 
00138 #define d2i_PROXYCERTINFO_bio(bp, pci) \
00139     (PROXYCERTINFO *) ASN1_d2i_bio((char *(*)()) PROXYCERTINFO_new, \
00140     (char *(*)()) d2i_PROXYCERTINFO, \
00141     (bp), (unsigned char **) pci)
00142 
00143 #define i2d_PROXYCERTINFO_bio(bp, pci) \
00144                 ASN1_i2d_bio(i2d_PROXYCERTINFO, bp, \
00145                 (unsigned char *)pci)
00146 
00147 /* functions */
00148     
00149 #if OPENSSL_VERSION_NUMBER < 0x10000000L
00150 ASN1_METHOD * PROXYCERTINFO_asn1_meth();
00151 #endif
00152 
00153 GLOBUS_DEPRECATED(
00154 PROXYCERTINFO * PROXYCERTINFO_dup(
00155     PROXYCERTINFO *                     cert_info));
00156 
00157 GLOBUS_DEPRECATED(int PROXYCERTINFO_cmp(
00158     const PROXYCERTINFO *               a,
00159     const PROXYCERTINFO *               b));
00160 
00161 GLOBUS_DEPRECATED(int PROXYCERTINFO_print(
00162     BIO *                               bp,
00163     PROXYCERTINFO *                     cert_info));
00164 
00165 GLOBUS_DEPRECATED(int PROXYCERTINFO_print_fp(
00166     FILE *                              fp,
00167     PROXYCERTINFO *                     cert_info));
00168 
00169 GLOBUS_DEPRECATED(int PROXYCERTINFO_set_policy(
00170     PROXYCERTINFO *                     cert_info,
00171     PROXYPOLICY *                       policy));
00172 
00173 GLOBUS_DEPRECATED(PROXYPOLICY * PROXYCERTINFO_get_policy(
00174     PROXYCERTINFO *                     cert_info));
00175 
00176 GLOBUS_DEPRECATED(int PROXYCERTINFO_set_path_length(
00177     PROXYCERTINFO *                     cert_info,
00178     long                                path_length));
00179 
00180 GLOBUS_DEPRECATED(long PROXYCERTINFO_get_path_length(
00181     PROXYCERTINFO *                     cert_info));
00182 
00183 GLOBUS_DEPRECATED(X509V3_EXT_METHOD * PROXYCERTINFO_x509v3_ext_meth());
00184 
00185 X509V3_EXT_METHOD * PROXYCERTINFO_OLD_x509v3_ext_meth();
00186 
00187 GLOBUS_DEPRECATED(STACK_OF(CONF_VALUE) * i2v_PROXYCERTINFO(
00188     struct v3_ext_method *              method,
00189     PROXYCERTINFO *                     ext,
00190     STACK_OF(CONF_VALUE) *              extlist));
00191 
00192 #ifdef __cplusplus
00193 }
00194 #endif
00195 
00196 #ifdef GLOBUS_DEPRECATED_IN_PROXYCERTINFO_H
00197 #   ifdef GLOBUS_DEPRECATED
00198 #       undef GLOBUS_DEPRECATED
00199 #   endif
00200 #   undef GLOBUS_DEPRECATED_IN_PROXYCERTINFO_H
00201 #endif
00202 
00203 #endif /* HEADER_PROXYCERTINFO_H */

Generated on 5 Nov 2016 for globus_gsi_proxy_ssl by  doxygen 1.4.7