globus_gsi_proxy.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 
00022 #ifndef GLOBUS_GLOBUS_GSI_PROXY_H
00023 #define GLOBUS_GLOBUS_GSI_PROXY_H
00024 
00025 #ifndef GLOBUS_GLOBAL_DOCUMENT_SET
00026 
00030 #endif
00031 
00063 #ifndef GLOBUS_DONT_DOCUMENT_INTERNAL
00064 #include "globus_gsi_credential.h"
00065 #include "globus_error_generic.h"
00066 #include "globus_error_openssl.h"
00067 #include "openssl/evp.h"
00068 #include "openssl/x509v3.h"
00069 #include "proxypolicy.h"
00070 #endif
00071 
00072 #ifdef __cplusplus
00073 extern "C" {
00074 #endif
00075 
00111 #define GLOBUS_GSI_PROXY_MODULE (&globus_i_gsi_proxy_module)
00112 
00113 extern
00114 globus_module_descriptor_t              globus_i_gsi_proxy_module;
00115 
00116 #define _PCSL(s) globus_common_i18n_get_string(\
00117                   GLOBUS_GSI_PROXY_MODULE, \
00118                   s)
00119 
00135 typedef struct globus_l_gsi_proxy_handle_s * 
00136                                         globus_gsi_proxy_handle_t;
00137 
00151 typedef struct 
00152 globus_l_gsi_proxy_handle_attrs_s *     globus_gsi_proxy_handle_attrs_t;
00153 
00154 
00168 globus_result_t
00169 globus_gsi_proxy_handle_init(
00170     globus_gsi_proxy_handle_t *         handle,
00171     globus_gsi_proxy_handle_attrs_t     handle_attrs);
00172 
00173 globus_result_t
00174 globus_gsi_proxy_handle_destroy(
00175     globus_gsi_proxy_handle_t           handle);
00176 
00177 globus_result_t
00178 globus_gsi_proxy_handle_get_req(
00179     globus_gsi_proxy_handle_t           handle,
00180     X509_REQ **                         req);
00181 
00182 globus_result_t
00183 globus_gsi_proxy_handle_set_req(
00184     globus_gsi_proxy_handle_t           handle,
00185     X509_REQ *                          req);
00186 
00187 globus_result_t
00188 globus_gsi_proxy_handle_get_private_key(
00189     globus_gsi_proxy_handle_t           handle,
00190     EVP_PKEY **                         proxy_key);
00191 
00192 globus_result_t
00193 globus_gsi_proxy_handle_set_private_key(
00194     globus_gsi_proxy_handle_t           handle,
00195     const EVP_PKEY *                    proxy_key);
00196 
00197 globus_result_t
00198 globus_gsi_proxy_handle_get_type(
00199     globus_gsi_proxy_handle_t           handle,
00200     globus_gsi_cert_utils_cert_type_t * type);
00201 
00202 globus_result_t
00203 globus_gsi_proxy_handle_set_type(
00204     globus_gsi_proxy_handle_t           handle,
00205     globus_gsi_cert_utils_cert_type_t   type);
00206 
00207 
00208 globus_result_t
00209 globus_gsi_proxy_handle_get_time_valid(
00210     globus_gsi_proxy_handle_t           handle,
00211     int *                               time_valid);
00212 
00213 globus_result_t
00214 globus_gsi_proxy_handle_set_time_valid(
00215     globus_gsi_proxy_handle_t           handle,
00216     int                                 time_valid);
00217 
00218 globus_result_t
00219 globus_gsi_proxy_handle_set_policy(
00220     globus_gsi_proxy_handle_t           handle,
00221     const unsigned char *               policy_data,
00222     int                                 policy_length,
00223     int                                 policy_NID);
00224 
00225 globus_result_t
00226 globus_gsi_proxy_handle_get_policy(
00227     globus_gsi_proxy_handle_t           handle,
00228     unsigned char **                    policy_data,
00229     int *                               policy_length,
00230     int *                               policy_NID);
00231 
00232 globus_result_t
00233 globus_gsi_proxy_handle_add_extension(
00234     globus_gsi_proxy_handle_t           handle,
00235     X509_EXTENSION *                    extension);
00236 
00237 globus_result_t
00238 globus_gsi_proxy_handle_set_extensions(
00239     globus_gsi_proxy_handle_t           handle,
00240     STACK_OF(X509_EXTENSION) *          extensions);
00241 
00242 globus_result_t
00243 globus_gsi_proxy_handle_get_extensions(
00244     globus_gsi_proxy_handle_t           handle,
00245     STACK_OF(X509_EXTENSION) **         extension);
00246 
00247 globus_result_t
00248 globus_gsi_proxy_handle_set_pathlen(
00249     globus_gsi_proxy_handle_t           handle,
00250     long                                pathlen);
00251 
00252 globus_result_t
00253 globus_gsi_proxy_handle_get_pathlen(
00254     globus_gsi_proxy_handle_t           handle,
00255     int *                               pathlen);
00256 
00257 globus_result_t
00258 globus_gsi_proxy_handle_clear_cert_info(
00259     globus_gsi_proxy_handle_t           handle);
00260 
00261 #ifdef GLOBUS_GSI_PROXY_CORE_COMPAT_0
00262 #include "proxycertinfo.h"
00263 
00264 #define globus_gsi_proxy_handle_get_proxy_cert_info(h,p) \
00265         globus_gsi_proxy_handle_get_proxy_cert_info_proxy_ssl(h,p)
00266 #define globus_gsi_proxy_handle_set_proxy_cert_info(h,p) \
00267         globus_gsi_proxy_handle_set_proxy_cert_info_proxy_ssl(h,p)
00268 
00269 globus_result_t
00270 globus_gsi_proxy_handle_get_proxy_cert_info_proxy_ssl(
00271     globus_gsi_proxy_handle_t           handle,
00272     PROXYCERTINFO **                    pci);
00273 
00274 globus_result_t
00275 globus_gsi_proxy_handle_set_proxy_cert_info_proxy_ssl(
00276     globus_gsi_proxy_handle_t           handle,
00277     PROXYCERTINFO *                     pci);
00278 #else
00279 globus_result_t
00280 globus_gsi_proxy_handle_get_proxy_cert_info(
00281     globus_gsi_proxy_handle_t           handle,
00282     PROXY_CERT_INFO_EXTENSION **        pci);
00283 
00284 globus_result_t
00285 globus_gsi_proxy_handle_set_proxy_cert_info(
00286     globus_gsi_proxy_handle_t           handle,
00287     PROXY_CERT_INFO_EXTENSION *         pci);
00288 #endif
00289 
00290 globus_result_t
00291 globus_gsi_proxy_handle_get_common_name(
00292     globus_gsi_proxy_handle_t           handle,
00293     char **                             common_name);
00294 
00295 globus_result_t
00296 globus_gsi_proxy_handle_set_common_name(
00297     globus_gsi_proxy_handle_t           handle,
00298     const char *                        common_name);
00299 
00300 globus_result_t
00301 globus_gsi_proxy_is_limited(
00302     globus_gsi_proxy_handle_t           handle,
00303     globus_bool_t *                     is_limited);
00304 
00305 globus_result_t
00306 globus_gsi_proxy_handle_set_is_limited(
00307     globus_gsi_proxy_handle_t           handle,
00308     globus_bool_t                       is_limited);
00309 
00310 globus_result_t
00311 globus_gsi_proxy_handle_get_signing_algorithm(
00312     globus_gsi_proxy_handle_t           handle,
00313     const EVP_MD **                     algorithm);
00314 
00315 globus_result_t
00316 globus_gsi_proxy_handle_get_keybits(
00317     globus_gsi_proxy_handle_t           handle,
00318     int *                               key_bits);
00319 
00320 globus_result_t
00321 globus_gsi_proxy_handle_get_init_prime(
00322     globus_gsi_proxy_handle_t           handle,
00323     int *                               init_prime);
00324 
00325 globus_result_t
00326 globus_gsi_proxy_handle_get_clock_skew_allowable(
00327     globus_gsi_proxy_handle_t           handle,
00328     int *                               skew);
00329 
00330 globus_result_t
00331 globus_gsi_proxy_handle_get_key_gen_callback(
00332     globus_gsi_proxy_handle_t           handle,
00333     void                                (**callback)(int, int, void *));
00334 
00347 globus_result_t
00348 globus_gsi_proxy_handle_attrs_init(
00349     globus_gsi_proxy_handle_attrs_t *   handle_attrs);
00350 
00351 globus_result_t
00352 globus_gsi_proxy_handle_attrs_destroy(
00353     globus_gsi_proxy_handle_attrs_t     handle_attrs);
00354 
00355 globus_result_t
00356 globus_gsi_proxy_handle_attrs_copy(
00357     globus_gsi_proxy_handle_attrs_t     a,
00358     globus_gsi_proxy_handle_attrs_t *   b);
00359 
00370 globus_result_t
00371 globus_gsi_proxy_create_req(
00372     globus_gsi_proxy_handle_t           handle,
00373     BIO *                               output_bio);
00374 
00375 globus_result_t
00376 globus_gsi_proxy_inquire_req(
00377     globus_gsi_proxy_handle_t           handle,
00378     BIO *                               input_bio);
00379 
00380 globus_result_t
00381 globus_gsi_proxy_sign_req(
00382     globus_gsi_proxy_handle_t           handle,
00383     globus_gsi_cred_handle_t            issuer_credential,
00384     BIO *                               output_bio);
00385 
00386 globus_result_t
00387 globus_gsi_proxy_resign_cert(
00388     globus_gsi_proxy_handle_t           handle,
00389     globus_gsi_cred_handle_t            issuer_credential,
00390     globus_gsi_cred_handle_t            peer_credential,
00391     globus_gsi_cred_handle_t *          resigned_credential);
00392 
00393 globus_result_t
00394 globus_gsi_proxy_assemble_cred(
00395     globus_gsi_proxy_handle_t           handle,
00396     globus_gsi_cred_handle_t *          proxy_credential,
00397     BIO *                               input_bio);
00398 
00399 globus_result_t
00400 globus_gsi_proxy_create_signed(
00401     globus_gsi_proxy_handle_t           handle,
00402     globus_gsi_cred_handle_t            issuer,
00403     globus_gsi_cred_handle_t *          proxy_credential);
00404 
00405 globus_result_t
00406 globus_gsi_proxy_handle_attrs_set_keybits(
00407     globus_gsi_proxy_handle_attrs_t     handle_attrs,
00408     int                                 bits);
00409 
00410 globus_result_t
00411 globus_gsi_proxy_handle_attrs_get_keybits(
00412     globus_gsi_proxy_handle_attrs_t     handle_attrs,
00413     int *                               bits);
00414 
00415 globus_result_t
00416 globus_gsi_proxy_handle_attrs_set_init_prime(
00417     globus_gsi_proxy_handle_attrs_t     handle_attrs,
00418     int                                 prime);
00419 
00420 globus_result_t
00421 globus_gsi_proxy_handle_attrs_get_init_prime(
00422     globus_gsi_proxy_handle_attrs_t     handle_attrs,
00423     int *                               prime);    
00424 
00425 globus_result_t
00426 globus_gsi_proxy_handle_attrs_set_signing_algorithm(
00427     globus_gsi_proxy_handle_attrs_t     handle_attrs,
00428     const EVP_MD *                      algorithm);
00429 
00430 globus_result_t
00431 globus_gsi_proxy_handle_attrs_get_signing_algorithm(
00432     globus_gsi_proxy_handle_attrs_t     handle_attrs,
00433     const EVP_MD **                     algorithm);
00434 
00435 globus_result_t
00436 globus_gsi_proxy_handle_attrs_set_clock_skew_allowable(
00437     globus_gsi_proxy_handle_attrs_t     handle,
00438     int                                 skew);
00439 
00440 globus_result_t
00441 globus_gsi_proxy_handle_attrs_get_clock_skew_allowable(
00442     globus_gsi_proxy_handle_attrs_t     handle,
00443     int *                               skew);
00444 
00445 globus_result_t
00446 globus_gsi_proxy_handle_attrs_get_key_gen_callback(
00447     globus_gsi_proxy_handle_attrs_t     handle,
00448     void                                (**callback)(int,  int, void *));
00449 
00450 globus_result_t
00451 globus_gsi_proxy_handle_attrs_set_key_gen_callback(
00452     globus_gsi_proxy_handle_attrs_t     handle,
00453     void                                (*callback)(int,  int, void *));
00454 
00455 #ifdef __cplusplus
00456 }
00457 #endif
00458 
00459 #endif /* GLOBUS_GLOBUS_GSI_PROXY_H */

Generated on 5 Nov 2016 for globus_gsi_proxy_core by  doxygen 1.4.7