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

Generated on 27 Oct 2014 for globus_gsi_proxy_core by  doxygen 1.4.7