Grid Community Toolkit  6.2.1550507116
proxycertinfo.h
Go to the documentation of this file.
1 /*
2  * Copyright 1999-2006 University of Chicago
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef HEADER_PROXYCERTINFO_H
18 #define HEADER_PROXYCERTINFO_H
19 
26 #ifndef GLOBUS_GLOBAL_DOCUMENT_SET
27 
31 #endif
32 
58 #include "proxypolicy.h"
59 #include <openssl/asn1.h>
60 #include <openssl/x509.h>
61 #include <openssl/x509v3.h>
62 #include <string.h>
63 
64 #ifdef __cplusplus
65 extern "C" {
66 #endif
67 
77 #define PROXYCERTINFO_OLD_OID "1.3.6.1.4.1.3536.1.222"
78 #define PROXYCERTINFO_OID "1.3.6.1.5.5.7.1.14"
79 #define PROXYCERTINFO_SN "PROXYCERTINFO"
80 #define PROXYCERTINFO_LN "Proxy Certificate Info Extension"
81 #define PROXYCERTINFO_OLD_SN "OLD_PROXYCERTINFO"
82 #define PROXYCERTINFO_OLD_LN "Proxy Certificate Info Extension (old OID)"
83 
84 /*
85  * Used for error checking
86  */
87 #define ASN1_F_PROXYCERTINFO_NEW 430
88 #define ASN1_F_D2I_PROXYCERTINFO 431
89 
90 #ifndef GLOBUS_DEPRECATED
91 #define GLOBUS_DEPRECATED_IN_PROXYCERTINFO_H
92 #if __GNUC__
93 # define GLOBUS_DEPRECATED(func) func __attribute__((deprecated))
94 #elif defined(_MSC_VER)
95 # define GLOBUS_DEPRECATED(func) __declspec(deprecated) func
96 #else
97 # define GLOBUS_DEPRECATED(func) func
98 #endif
99 #endif
100 
101 /*
102  * The PROXYCERTINFO functions are deprecated, as OpenSSL has provided
103  * its own data structure since 0.9.8.
104  */
105 /* data structures */
106 
125 {
126  ASN1_INTEGER * path_length; /* [ OPTIONAL ] */
127  PROXYPOLICY * policy;
128 };
129 
130 typedef struct PROXYCERTINFO_st PROXYCERTINFO;
131 
132 #ifdef DECLARE_STACK_OF
133 DECLARE_STACK_OF(PROXYCERTINFO)
134 #endif
135 
136 DECLARE_ASN1_FUNCTIONS(PROXYCERTINFO)
137 
138 /* macros */
139 
140 #define d2i_PROXYCERTINFO_bio(bp, pci) \
141  (PROXYCERTINFO *) ASN1_d2i_bio((char *(*)()) PROXYCERTINFO_new, \
142  (char *(*)()) d2i_PROXYCERTINFO, \
143  (bp), (unsigned char **) pci)
144 
145 #define i2d_PROXYCERTINFO_bio(bp, pci) \
146  ASN1_i2d_bio(i2d_PROXYCERTINFO, bp, \
147  (unsigned char *)pci)
148 
149 /* functions */
150 
151 #if OPENSSL_VERSION_NUMBER < 0x10000000L
152 ASN1_METHOD * PROXYCERTINFO_asn1_meth();
153 #endif
154 
155 GLOBUS_DEPRECATED(
156 PROXYCERTINFO * PROXYCERTINFO_dup(
157  PROXYCERTINFO * cert_info));
158 
159 GLOBUS_DEPRECATED(int PROXYCERTINFO_cmp(
160  const PROXYCERTINFO * a,
161  const PROXYCERTINFO * b));
162 
163 GLOBUS_DEPRECATED(int PROXYCERTINFO_print(
164  BIO * bp,
165  PROXYCERTINFO * cert_info));
166 
167 GLOBUS_DEPRECATED(int PROXYCERTINFO_print_fp(
168  FILE * fp,
169  PROXYCERTINFO * cert_info));
170 
171 GLOBUS_DEPRECATED(int PROXYCERTINFO_set_policy(
172  PROXYCERTINFO * cert_info,
173  PROXYPOLICY * policy));
174 
175 GLOBUS_DEPRECATED(PROXYPOLICY * PROXYCERTINFO_get_policy(
176  PROXYCERTINFO * cert_info));
177 
178 GLOBUS_DEPRECATED(int PROXYCERTINFO_set_path_length(
179  PROXYCERTINFO * cert_info,
180  long path_length));
181 
182 GLOBUS_DEPRECATED(long PROXYCERTINFO_get_path_length(
183  PROXYCERTINFO * cert_info));
184 
185 GLOBUS_DEPRECATED(X509V3_EXT_METHOD * PROXYCERTINFO_x509v3_ext_meth());
186 
187 X509V3_EXT_METHOD * PROXYCERTINFO_OLD_x509v3_ext_meth();
188 
189 GLOBUS_DEPRECATED(STACK_OF(CONF_VALUE) * i2v_PROXYCERTINFO(
190  struct v3_ext_method * method,
191  PROXYCERTINFO * ext,
192  STACK_OF(CONF_VALUE) * extlist));
193 
194 #ifdef __cplusplus
195 }
196 #endif
197 
198 #ifdef GLOBUS_DEPRECATED_IN_PROXYCERTINFO_H
199 # ifdef GLOBUS_DEPRECATED
200 # undef GLOBUS_DEPRECATED
201 # endif
202 # undef GLOBUS_DEPRECATED_IN_PROXYCERTINFO_H
203 #endif
204 
205 #endif /* HEADER_PROXYCERTINFO_H */
Definition: proxycertinfo.h:124
Definition: proxypolicy.h:87
Proxy Policy.