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