globus_gsi_proxy_ssl  5.7
 All Data Structures Files Functions Groups Pages
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 
61 #include <openssl/x509.h>
62 #include <openssl/x509v3.h>
63 #include <string.h>
64 
65 #ifdef __cplusplus
66 extern "C" {
67 #endif
68 
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 
91 /* data structures */
92 
111 {
112  ASN1_INTEGER * path_length; /* [ OPTIONAL ] */
113  PROXYPOLICY * policy;
114 };
115 
116 typedef struct PROXYCERTINFO_st PROXYCERTINFO;
117 
118 DECLARE_STACK_OF(PROXYCERTINFO)
119 DECLARE_ASN1_SET_OF(PROXYCERTINFO)
120 
121 /* macros */
122 
123 #define d2i_PROXYCERTINFO_bio(bp, pci) \
124  (PROXYCERTINFO *) ASN1_d2i_bio((char *(*)()) PROXYCERTINFO_new, \
125  (char *(*)()) d2i_PROXYCERTINFO, \
126  (bp), (unsigned char **) pci)
127 
128 #define i2d_PROXYCERTINFO_bio(bp, pci) \
129  ASN1_i2d_bio(i2d_PROXYCERTINFO, bp, \
130  (unsigned char *)pci)
131 
132 /* functions */
133 
134 #if OPENSSL_VERSION_NUMBER < 0x10000000L
135 ASN1_METHOD * PROXYCERTINFO_asn1_meth();
136 #endif
137 
139 
140 void PROXYCERTINFO_free(
141  PROXYCERTINFO * cert_info);
142 
144  PROXYCERTINFO * cert_info);
145 
147  const PROXYCERTINFO * a,
148  const PROXYCERTINFO * b);
149 
151  BIO * bp,
152  PROXYCERTINFO * cert_info);
153 
155  FILE * fp,
156  PROXYCERTINFO * cert_info);
157 
159  PROXYCERTINFO * cert_info,
160  PROXYPOLICY * policy);
161 
163  PROXYCERTINFO * cert_info);
164 
166  PROXYCERTINFO * cert_info,
167  long path_length);
168 
170  PROXYCERTINFO * cert_info);
171 
173  PROXYCERTINFO * cert_info,
174  unsigned char ** a);
175 
177  PROXYCERTINFO ** cert_info,
178  unsigned char ** a,
179  long length);
180 
182  PROXYCERTINFO * cert_info,
183  unsigned char ** a);
184 
186  PROXYCERTINFO ** cert_info,
187  unsigned char ** a,
188  long length);
189 
190 X509V3_EXT_METHOD * PROXYCERTINFO_x509v3_ext_meth();
191 
192 X509V3_EXT_METHOD * PROXYCERTINFO_OLD_x509v3_ext_meth();
193 
194 STACK_OF(CONF_VALUE) * i2v_PROXYCERTINFO(
195  struct v3_ext_method * method,
196  PROXYCERTINFO * ext,
197  STACK_OF(CONF_VALUE) * extlist);
198 
199 #ifdef __cplusplus
200 }
201 #endif
202 
203 #endif /* HEADER_PROXYCERTINFO_H */