proxypolicy.h

Go to the documentation of this file.
00001 /*
00002  * Copyright 1999-2006 University of Chicago
00003  * 
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  * 
00008  * http://www.apache.org/licenses/LICENSE-2.0
00009  * 
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 
00018 #ifndef HEADER_PROXYPOLICY_H
00019 #define HEADER_PROXYPOLICY_H
00020 
00041 #include <openssl/x509.h>
00042 #include <openssl/x509v3.h>
00043 #include <string.h>
00044 
00045 #ifdef __cplusplus
00046 extern "C" {
00047 #endif
00048 
00049 #define ANY_LANGUAGE_OID         "1.3.6.1.5.5.7.21.0"
00050 #define ANY_LANGUAGE_SN          "ANY_LANGUAGE"
00051 #define ANY_LANGUAGE_LN          "Any Language"
00052 
00053 #define IMPERSONATION_PROXY_OID         "1.3.6.1.5.5.7.21.1"
00054 #define IMPERSONATION_PROXY_SN          "IMPERSONATION_PROXY"
00055 #define IMPERSONATION_PROXY_LN          "GSI impersonation proxy"
00056 
00057 #define INDEPENDENT_PROXY_OID           "1.3.6.1.5.5.7.21.2"
00058 #define INDEPENDENT_PROXY_SN            "INDEPENDENT_PROXY"
00059 #define INDEPENDENT_PROXY_LN            "GSI independent proxy"
00060 
00061 #define LIMITED_PROXY_OID               "1.3.6.1.4.1.3536.1.1.1.9"
00062 #define LIMITED_PROXY_SN                "LIMITED_PROXY"
00063 #define LIMITED_PROXY_LN                "GSI limited proxy"
00064 
00065 /* Used for error handling */
00066 #define ASN1_F_PROXYPOLICY_NEW          450
00067 #define ASN1_F_D2I_PROXYPOLICY          451
00068 
00069 /* data structures */
00070 
00086 struct PROXYPOLICY_st
00087 {
00088     ASN1_OBJECT *                       policy_language;
00089     ASN1_OCTET_STRING *                 policy;
00090 };
00091 
00092 typedef struct PROXYPOLICY_st PROXYPOLICY;
00093 
00094 DECLARE_STACK_OF(PROXYPOLICY)
00095 DECLARE_ASN1_SET_OF(PROXYPOLICY)
00096 
00097 /* functions */
00098 
00099 #if OPENSSL_VERSION_NUMBER < 0x10000000L
00100 ASN1_METHOD * PROXYPOLICY_asn1_meth();
00101 #endif
00102 
00103 PROXYPOLICY * PROXYPOLICY_new();
00104 
00105 void PROXYPOLICY_free();
00106 
00107 PROXYPOLICY * PROXYPOLICY_dup(
00108     PROXYPOLICY *                       policy);
00109 
00110 int PROXYPOLICY_cmp(
00111     const PROXYPOLICY *                 a,
00112     const PROXYPOLICY *                 b);
00113 
00114 int PROXYPOLICY_print(
00115     BIO *                               bp,
00116     PROXYPOLICY *                       policy);
00117 
00118 int PROXYPOLICY_print_fp(
00119     FILE *                              fp,
00120     PROXYPOLICY *                       policy);
00121 
00122 int PROXYPOLICY_set_policy_language(
00123     PROXYPOLICY *                       policy,
00124     ASN1_OBJECT *                       policy_language);
00125 
00126 ASN1_OBJECT * PROXYPOLICY_get_policy_language(
00127     PROXYPOLICY *                       policy);
00128 
00129 int PROXYPOLICY_set_policy(
00130     PROXYPOLICY *                       proxypolicy,
00131     unsigned char *                     policy,
00132     int                                 length);
00133 
00134 unsigned char * PROXYPOLICY_get_policy(
00135     PROXYPOLICY *                       policy,
00136     int *                               length);
00137 
00138 int i2d_PROXYPOLICY(
00139     PROXYPOLICY *                       policy,
00140     unsigned char **                    a);
00141 
00142 PROXYPOLICY * d2i_PROXYPOLICY(
00143     PROXYPOLICY **                      policy,
00144     unsigned char **                    a,
00145     long                                length);
00146 
00147 X509V3_EXT_METHOD * PROXYPOLICY_x509v3_ext_meth();
00148 
00149 STACK_OF(CONF_VALUE) * i2v_PROXYPOLICY(
00150     struct v3_ext_method *              method,
00151     PROXYPOLICY *                       ext,
00152     STACK_OF(CONF_VALUE) *              extlist);
00153 
00154 #ifdef __cplusplus
00155 }
00156 #endif
00157 
00158 #endif /* HEADER_PROXYPOLICY_H */

Generated on 27 Oct 2014 for globus_gsi_proxy_ssl by  doxygen 1.4.7