Grid Community Toolkit  6.2.1541705016
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 
57 #include "proxypolicy.h"
58 #include <openssl/asn1.h>
59 #include <openssl/x509.h>
60 #include <openssl/x509v3.h>
61 #include <string.h>
62 
63 #ifdef __cplusplus
64 extern "C" {
65 #endif
66 
75 #define PROXYCERTINFO_OLD_OID "1.3.6.1.4.1.3536.1.222"
76 #define PROXYCERTINFO_OID "1.3.6.1.5.5.7.1.14"
77 #define PROXYCERTINFO_SN "PROXYCERTINFO"
78 #define PROXYCERTINFO_LN "Proxy Certificate Info Extension"
79 #define PROXYCERTINFO_OLD_SN "OLD_PROXYCERTINFO"
80 #define PROXYCERTINFO_OLD_LN "Proxy Certificate Info Extension (old OID)"
81 
82 /*
83  * Used for error checking
84  */
85 #define ASN1_F_PROXYCERTINFO_NEW 430
86 #define ASN1_F_D2I_PROXYCERTINFO 431
87 
88 #ifndef GLOBUS_DEPRECATED
89 #define GLOBUS_DEPRECATED_IN_PROXYCERTINFO_H
90 #if __GNUC__
91 # define GLOBUS_DEPRECATED(func) func __attribute__((deprecated))
92 #elif defined(_MSC_VER)
93 # define GLOBUS_DEPRECATED(func) __declspec(deprecated) func
94 #else
95 # define GLOBUS_DEPRECATED(func) func
96 #endif
97 #endif
98 
99 /*
100  * The PROXYCERTINFO functions are deprecated, as OpenSSL has provided
101  * its own data structure since 0.9.8.
102  */
103 /* data structures */
104 
123 {
124  ASN1_INTEGER * path_length; /* [ OPTIONAL ] */
125  PROXYPOLICY * policy;
126 };
127 
128 typedef struct PROXYCERTINFO_st PROXYCERTINFO;
129 
130 #ifdef DECLARE_STACK_OF
131 DECLARE_STACK_OF(PROXYCERTINFO)
132 #endif
133 
134 DECLARE_ASN1_FUNCTIONS(PROXYCERTINFO)
135 
136 /* macros */
137 
138 #define d2i_PROXYCERTINFO_bio(bp, pci) \
139  (PROXYCERTINFO *) ASN1_d2i_bio((char *(*)()) PROXYCERTINFO_new, \
140  (char *(*)()) d2i_PROXYCERTINFO, \
141  (bp), (unsigned char **) pci)
142 
143 #define i2d_PROXYCERTINFO_bio(bp, pci) \
144  ASN1_i2d_bio(i2d_PROXYCERTINFO, bp, \
145  (unsigned char *)pci)
146 
147 /* functions */
148 
149 #if OPENSSL_VERSION_NUMBER < 0x10000000L
150 ASN1_METHOD * PROXYCERTINFO_asn1_meth();
151 #endif
152 
153 GLOBUS_DEPRECATED(
154 PROXYCERTINFO * PROXYCERTINFO_dup(
155  PROXYCERTINFO * cert_info));
156 
157 GLOBUS_DEPRECATED(int PROXYCERTINFO_cmp(
158  const PROXYCERTINFO * a,
159  const PROXYCERTINFO * b));
160 
161 GLOBUS_DEPRECATED(int PROXYCERTINFO_print(
162  BIO * bp,
163  PROXYCERTINFO * cert_info));
164 
165 GLOBUS_DEPRECATED(int PROXYCERTINFO_print_fp(
166  FILE * fp,
167  PROXYCERTINFO * cert_info));
168 
169 GLOBUS_DEPRECATED(int PROXYCERTINFO_set_policy(
170  PROXYCERTINFO * cert_info,
171  PROXYPOLICY * policy));
172 
173 GLOBUS_DEPRECATED(PROXYPOLICY * PROXYCERTINFO_get_policy(
174  PROXYCERTINFO * cert_info));
175 
176 GLOBUS_DEPRECATED(int PROXYCERTINFO_set_path_length(
177  PROXYCERTINFO * cert_info,
178  long path_length));
179 
180 GLOBUS_DEPRECATED(long PROXYCERTINFO_get_path_length(
181  PROXYCERTINFO * cert_info));
182 
183 GLOBUS_DEPRECATED(X509V3_EXT_METHOD * PROXYCERTINFO_x509v3_ext_meth());
184 
185 X509V3_EXT_METHOD * PROXYCERTINFO_OLD_x509v3_ext_meth();
186 
187 GLOBUS_DEPRECATED(STACK_OF(CONF_VALUE) * i2v_PROXYCERTINFO(
188  struct v3_ext_method * method,
189  PROXYCERTINFO * ext,
190  STACK_OF(CONF_VALUE) * extlist));
191 
192 #ifdef __cplusplus
193 }
194 #endif
195 
196 #ifdef GLOBUS_DEPRECATED_IN_PROXYCERTINFO_H
197 # ifdef GLOBUS_DEPRECATED
198 # undef GLOBUS_DEPRECATED
199 # endif
200 # undef GLOBUS_DEPRECATED_IN_PROXYCERTINFO_H
201 #endif
202 
203 #endif /* HEADER_PROXYCERTINFO_H */
Definition: proxycertinfo.h:122
Definition: proxypolicy.h:86
Proxy Policy.