Grid Community Toolkit  6.2.1541705016
proxypolicy.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 
18 #ifndef HEADER_PROXYPOLICY_H
19 #define HEADER_PROXYPOLICY_H
20 
41 #include <openssl/x509.h>
42 #include <openssl/x509v3.h>
43 #include <string.h>
44 
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 
49 #define ANY_LANGUAGE_OID "1.3.6.1.5.5.7.21.0"
50 #define ANY_LANGUAGE_SN "ANY_LANGUAGE"
51 #define ANY_LANGUAGE_LN "Any Language"
52 
53 #define IMPERSONATION_PROXY_OID "1.3.6.1.5.5.7.21.1"
54 #define IMPERSONATION_PROXY_SN "IMPERSONATION_PROXY"
55 #define IMPERSONATION_PROXY_LN "GSI impersonation proxy"
56 
57 #define INDEPENDENT_PROXY_OID "1.3.6.1.5.5.7.21.2"
58 #define INDEPENDENT_PROXY_SN "INDEPENDENT_PROXY"
59 #define INDEPENDENT_PROXY_LN "GSI independent proxy"
60 
61 #define LIMITED_PROXY_OID "1.3.6.1.4.1.3536.1.1.1.9"
62 #define LIMITED_PROXY_SN "LIMITED_PROXY"
63 #define LIMITED_PROXY_LN "GSI limited proxy"
64 
65 /* Used for error handling */
66 #define ASN1_F_PROXYPOLICY_NEW 450
67 #define ASN1_F_D2I_PROXYPOLICY 451
68 
69 /* data structures */
70 
87 {
88  ASN1_OBJECT * policy_language;
89  ASN1_OCTET_STRING * policy;
90 };
91 
92 typedef struct PROXYPOLICY_st PROXYPOLICY;
93 
94 #ifdef DECLARE_STACK_OF
95 DECLARE_STACK_OF(PROXYPOLICY)
96 #endif
97 DECLARE_ASN1_FUNCTIONS(PROXYPOLICY)
98 
99 /* functions */
100 
101 #if OPENSSL_VERSION_NUMBER < 0x10000000L
102 ASN1_METHOD * PROXYPOLICY_asn1_meth();
103 #endif
104 
105 PROXYPOLICY * PROXYPOLICY_dup(
106  PROXYPOLICY * policy);
107 
108 int PROXYPOLICY_cmp(
109  const PROXYPOLICY * a,
110  const PROXYPOLICY * b);
111 
112 int PROXYPOLICY_print(
113  BIO * bp,
114  PROXYPOLICY * policy);
115 
116 int PROXYPOLICY_print_fp(
117  FILE * fp,
118  PROXYPOLICY * policy);
119 
120 int PROXYPOLICY_set_policy_language(
121  PROXYPOLICY * policy,
122  ASN1_OBJECT * policy_language);
123 
124 ASN1_OBJECT * PROXYPOLICY_get_policy_language(
125  PROXYPOLICY * policy);
126 
127 int PROXYPOLICY_set_policy(
128  PROXYPOLICY * proxypolicy,
129  unsigned char * policy,
130  int length);
131 
132 unsigned char * PROXYPOLICY_get_policy(
133  PROXYPOLICY * policy,
134  int * length);
135 
136 X509V3_EXT_METHOD * PROXYPOLICY_x509v3_ext_meth();
137 
138 STACK_OF(CONF_VALUE) * i2v_PROXYPOLICY(
139  struct v3_ext_method * method,
140  PROXYPOLICY * ext,
141  STACK_OF(CONF_VALUE) * extlist);
142 
143 #ifdef __cplusplus
144 }
145 #endif
146 
147 #endif /* HEADER_PROXYPOLICY_H */
Definition: proxypolicy.h:86