/usr/include/globus/globus_gsi_proxy.h is in libglobus-gsi-proxy-core-dev 8.6-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 | /*
* Copyright 1999-2006 University of Chicago
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file globus_gsi_proxy.h Globus GSI Proxy API
* @brief Globus GSI Proxy API
*/
#ifndef GLOBUS_GLOBUS_GSI_PROXY_H
#define GLOBUS_GLOBUS_GSI_PROXY_H
#ifndef GLOBUS_GLOBAL_DOCUMENT_SET
/**
* @mainpage Globus GSI Proxy API
* @copydoc globus_gsi_proxy
*/
#endif
/**
* @defgroup globus_gsi_proxy Globus GSI Proxy API
*
* The globus_gsi_proxy library is motivated by the desire to provide
* a abstraction layer for the proxy creation and delegation
* process. For background on this process please refer to the proxy
* certificate profile draft.
*
* Any program that uses Globus GSI Proxy functions must include
* ``"globus_gsi_proxy.h"``.
*
* We envision the API being used in the following manner:
*
* | Delegator | Delegatee
* |--------------------------------|-------------------------------------|
* | | set desired cert info extension in the handle by using the handle set functions. |
* | | globus_gsi_proxy_create_req() |
* | globus_gsi_proxy_inquire_req() | |
* | modify cert info extension by using [handle set/get/clear functions.](@ref globus_gsi_proxy_handle)||
* | globus_gsi_proxy_sign_req() | |
* | | globus_gsi_proxy_assemble_cred() |
*
* The API documentation is divided into the following sections
* - @ref globus_gsi_proxy_activation
* - @ref globus_gsi_proxy_handle
* - @ref globus_gsi_proxy_handle_attrs
* - @ref globus_gsi_proxy_operations
* - @ref globus_gsi_proxy_constants
*/
#ifndef GLOBUS_DONT_DOCUMENT_INTERNAL
#include "globus_gsi_credential.h"
#include "globus_error_generic.h"
#include "globus_error_openssl.h"
#include "openssl/evp.h"
#include "openssl/x509v3.h"
#include "proxypolicy.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
/**
* @defgroup globus_gsi_proxy_activation Activation
* @ingroup globus_gsi_proxy
*
* Globus GSI Proxy uses standard Globus module activation and
* deactivation. Before any Globus GSI Proxy functions are called, the
* following function must be called:
*
* @code
globus_module_activate(GLOBUS_GSI_PROXY_MODULE)
@endcode
*
*
* This function returns GLOBUS_SUCCESS if Globus GSI Proxy was
* successfully initialized, and you are therefore allowed to
* subsequently call Globus GSI Proxy functions. Otherwise, an error
* code is returned, and Globus GSI Proxy functions should not be
* subsequently called. This function may be called multiple times.
*
* To deactivate Globus GSI Proxy, the following function must be called:
*
@code
globus_module_deactivate(GLOBUS_GSI_PROXY_MODULE)
@endcode
*
* This function should be called once for each time Globus GSI Proxy
* was activated.
*
*/
/**
* @brief Module descriptor
* @ingroup globus_gsi_proxy_activation
* @hideinitializer
*/
#define GLOBUS_GSI_PROXY_MODULE (&globus_i_gsi_proxy_module)
extern
globus_module_descriptor_t globus_i_gsi_proxy_module;
#define _PCSL(s) globus_common_i18n_get_string(\
GLOBUS_GSI_PROXY_MODULE, \
s)
/**
* @brief GSI Proxy Handle
* @ingroup globus_gsi_proxy_handle
* @details
* An GSI Proxy handle is used to associate state with a group of
* operations. Handles can have immutable
* @ref globus_gsi_proxy_handle_attrs "attributes"
* associated with them. All proxy @link
* globus_gsi_proxy_operations operations @endlink take a handle pointer
* as a parameter.
*
* @see globus_gsi_proxy_handle_init(),
* globus_gsi_proxy_handle_destroy(), @ref globus_gsi_proxy_handle_attrs
*/
typedef struct globus_l_gsi_proxy_handle_s *
globus_gsi_proxy_handle_t;
/**
* @brief Handle Attributes
* @ingroup globus_gsi_proxy_handle_attrs
* @details
* A GSI Proxy handle attributes type is used to associate immutable
* parameter values with a @ref globus_gsi_proxy_handle handle.
* A handle attributes object should be created with immutable parameters
* and then passed to the proxy handle init
* function globus_gsi_proxy_handle_init().
*
* @see @ref globus_gsi_proxy_handle
*/
typedef struct
globus_l_gsi_proxy_handle_attrs_s * globus_gsi_proxy_handle_attrs_t;
/**
* @brief Create/Destroy/Modify a GSI Proxy Handle
* @defgroup globus_gsi_proxy_handle Handle Management
* @ingroup globus_gsi_proxy
* @details
* Within the Globus GSI Proxy Library, all proxy operations require a
* handle parameter. Currently, only one proxy operation may be in
* progress at once per proxy handle.
*
* This section defines operations to create, modify and destroy GSI
* Proxy handles.
*/
globus_result_t
globus_gsi_proxy_handle_init(
globus_gsi_proxy_handle_t * handle,
globus_gsi_proxy_handle_attrs_t handle_attrs);
globus_result_t
globus_gsi_proxy_handle_destroy(
globus_gsi_proxy_handle_t handle);
globus_result_t
globus_gsi_proxy_handle_get_req(
globus_gsi_proxy_handle_t handle,
X509_REQ ** req);
globus_result_t
globus_gsi_proxy_handle_set_req(
globus_gsi_proxy_handle_t handle,
X509_REQ * req);
globus_result_t
globus_gsi_proxy_handle_get_private_key(
globus_gsi_proxy_handle_t handle,
EVP_PKEY ** proxy_key);
globus_result_t
globus_gsi_proxy_handle_set_private_key(
globus_gsi_proxy_handle_t handle,
const EVP_PKEY * proxy_key);
globus_result_t
globus_gsi_proxy_handle_get_type(
globus_gsi_proxy_handle_t handle,
globus_gsi_cert_utils_cert_type_t * type);
globus_result_t
globus_gsi_proxy_handle_set_type(
globus_gsi_proxy_handle_t handle,
globus_gsi_cert_utils_cert_type_t type);
globus_result_t
globus_gsi_proxy_handle_get_time_valid(
globus_gsi_proxy_handle_t handle,
int * time_valid);
globus_result_t
globus_gsi_proxy_handle_set_time_valid(
globus_gsi_proxy_handle_t handle,
int time_valid);
globus_result_t
globus_gsi_proxy_handle_set_policy(
globus_gsi_proxy_handle_t handle,
const unsigned char * policy_data,
int policy_length,
int policy_NID);
globus_result_t
globus_gsi_proxy_handle_get_policy(
globus_gsi_proxy_handle_t handle,
unsigned char ** policy_data,
int * policy_length,
int * policy_NID);
globus_result_t
globus_gsi_proxy_handle_add_extension(
globus_gsi_proxy_handle_t handle,
X509_EXTENSION * extension);
globus_result_t
globus_gsi_proxy_handle_set_extensions(
globus_gsi_proxy_handle_t handle,
STACK_OF(X509_EXTENSION) * extensions);
globus_result_t
globus_gsi_proxy_handle_get_extensions(
globus_gsi_proxy_handle_t handle,
STACK_OF(X509_EXTENSION) ** extension);
globus_result_t
globus_gsi_proxy_handle_set_pathlen(
globus_gsi_proxy_handle_t handle,
long pathlen);
globus_result_t
globus_gsi_proxy_handle_get_pathlen(
globus_gsi_proxy_handle_t handle,
int * pathlen);
globus_result_t
globus_gsi_proxy_handle_clear_cert_info(
globus_gsi_proxy_handle_t handle);
#ifdef GLOBUS_GSI_PROXY_CORE_COMPAT_0
#include "proxycertinfo.h"
#define globus_gsi_proxy_handle_get_proxy_cert_info(h,p) \
globus_gsi_proxy_handle_get_proxy_cert_info_proxy_ssl(h,p)
#define globus_gsi_proxy_handle_set_proxy_cert_info(h,p) \
globus_gsi_proxy_handle_set_proxy_cert_info_proxy_ssl(h,p)
globus_result_t
globus_gsi_proxy_handle_get_proxy_cert_info_proxy_ssl(
globus_gsi_proxy_handle_t handle,
PROXYCERTINFO ** pci);
globus_result_t
globus_gsi_proxy_handle_set_proxy_cert_info_proxy_ssl(
globus_gsi_proxy_handle_t handle,
PROXYCERTINFO * pci);
#else
globus_result_t
globus_gsi_proxy_handle_get_proxy_cert_info(
globus_gsi_proxy_handle_t handle,
PROXY_CERT_INFO_EXTENSION ** pci);
globus_result_t
globus_gsi_proxy_handle_set_proxy_cert_info(
globus_gsi_proxy_handle_t handle,
PROXY_CERT_INFO_EXTENSION * pci);
#endif
globus_result_t
globus_gsi_proxy_handle_get_common_name(
globus_gsi_proxy_handle_t handle,
char ** common_name);
globus_result_t
globus_gsi_proxy_handle_set_common_name(
globus_gsi_proxy_handle_t handle,
const char * common_name);
globus_result_t
globus_gsi_proxy_is_limited(
globus_gsi_proxy_handle_t handle,
globus_bool_t * is_limited);
globus_result_t
globus_gsi_proxy_handle_set_is_limited(
globus_gsi_proxy_handle_t handle,
globus_bool_t is_limited);
globus_result_t
globus_gsi_proxy_handle_get_signing_algorithm(
globus_gsi_proxy_handle_t handle,
const EVP_MD ** algorithm);
globus_result_t
globus_gsi_proxy_handle_get_keybits(
globus_gsi_proxy_handle_t handle,
int * key_bits);
globus_result_t
globus_gsi_proxy_handle_get_init_prime(
globus_gsi_proxy_handle_t handle,
int * init_prime);
globus_result_t
globus_gsi_proxy_handle_get_clock_skew_allowable(
globus_gsi_proxy_handle_t handle,
int * skew);
globus_result_t
globus_gsi_proxy_handle_get_key_gen_callback(
globus_gsi_proxy_handle_t handle,
void (**callback)(int, int, void *));
/**
* @defgroup globus_gsi_proxy_handle_attrs Handle Attributes
* @ingroup globus_gsi_proxy
*
* Handle attributes are used to control additional features of the
* GSI Proxy handle. These features are operation independent.
*
* Currently there are no attributes.
*
* @see globus_gsi_proxy_handle_t
*/
globus_result_t
globus_gsi_proxy_handle_attrs_init(
globus_gsi_proxy_handle_attrs_t * handle_attrs);
globus_result_t
globus_gsi_proxy_handle_attrs_destroy(
globus_gsi_proxy_handle_attrs_t handle_attrs);
globus_result_t
globus_gsi_proxy_handle_attrs_copy(
globus_gsi_proxy_handle_attrs_t a,
globus_gsi_proxy_handle_attrs_t * b);
/**
* @brief Initiate a proxy operation
* @defgroup globus_gsi_proxy_operations Proxy Operations
* @ingroup globus_gsi_proxy
* @details
* This module contains the API functions for a user to request proxy
* request generation, proxy request inspection and proxy request
* signature.
*/
globus_result_t
globus_gsi_proxy_create_req(
globus_gsi_proxy_handle_t handle,
BIO * output_bio);
globus_result_t
globus_gsi_proxy_inquire_req(
globus_gsi_proxy_handle_t handle,
BIO * input_bio);
globus_result_t
globus_gsi_proxy_sign_req(
globus_gsi_proxy_handle_t handle,
globus_gsi_cred_handle_t issuer_credential,
BIO * output_bio);
globus_result_t
globus_gsi_proxy_resign_cert(
globus_gsi_proxy_handle_t handle,
globus_gsi_cred_handle_t issuer_credential,
globus_gsi_cred_handle_t peer_credential,
globus_gsi_cred_handle_t * resigned_credential);
globus_result_t
globus_gsi_proxy_assemble_cred(
globus_gsi_proxy_handle_t handle,
globus_gsi_cred_handle_t * proxy_credential,
BIO * input_bio);
globus_result_t
globus_gsi_proxy_create_signed(
globus_gsi_proxy_handle_t handle,
globus_gsi_cred_handle_t issuer,
globus_gsi_cred_handle_t * proxy_credential);
globus_result_t
globus_gsi_proxy_handle_attrs_set_keybits(
globus_gsi_proxy_handle_attrs_t handle_attrs,
int bits);
globus_result_t
globus_gsi_proxy_handle_attrs_get_keybits(
globus_gsi_proxy_handle_attrs_t handle_attrs,
int * bits);
globus_result_t
globus_gsi_proxy_handle_attrs_set_init_prime(
globus_gsi_proxy_handle_attrs_t handle_attrs,
int prime);
globus_result_t
globus_gsi_proxy_handle_attrs_get_init_prime(
globus_gsi_proxy_handle_attrs_t handle_attrs,
int * prime);
globus_result_t
globus_gsi_proxy_handle_attrs_set_signing_algorithm(
globus_gsi_proxy_handle_attrs_t handle_attrs,
const EVP_MD * algorithm);
globus_result_t
globus_gsi_proxy_handle_attrs_get_signing_algorithm(
globus_gsi_proxy_handle_attrs_t handle_attrs,
const EVP_MD ** algorithm);
globus_result_t
globus_gsi_proxy_handle_attrs_set_clock_skew_allowable(
globus_gsi_proxy_handle_attrs_t handle,
int skew);
globus_result_t
globus_gsi_proxy_handle_attrs_get_clock_skew_allowable(
globus_gsi_proxy_handle_attrs_t handle,
int * skew);
globus_result_t
globus_gsi_proxy_handle_attrs_get_key_gen_callback(
globus_gsi_proxy_handle_attrs_t handle,
void (**callback)(int, int, void *));
globus_result_t
globus_gsi_proxy_handle_attrs_set_key_gen_callback(
globus_gsi_proxy_handle_attrs_t handle,
void (*callback)(int, int, void *));
#ifdef __cplusplus
}
#endif
#endif /* GLOBUS_GLOBUS_GSI_PROXY_H */
|