Loading...
Searching...
No Matches
globus_gsi_callback.h
Go to the documentation of this file.
/*
* 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.
*/
#ifndef GLOBUS_GSI_CALLBACK_H
#define GLOBUS_GSI_CALLBACK_H
#include "globus_common.h"
#include "globus_gsi_cert_utils.h"
#include "openssl/x509.h"
#ifndef GLOBUS_GLOBAL_DOCUMENT_SET
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define GLOBUS_GSI_CALLBACK_MODULE (&globus_i_gsi_callback_module)
extern
globus_module_descriptor_t globus_i_gsi_callback_module;
#define _CLS(s) globus_common_i18n_get_string(GLOBUS_GSI_CALLBACK_MODULE,\
s)
typedef struct globus_l_gsi_callback_data_s *
globus_gsi_callback_data_t;
#if OPENSSL_VERSION_NUMBER < 0x40000000L
typedef int (*globus_gsi_extension_callback_t)(
globus_gsi_callback_data_t callback_data,
X509_EXTENSION * extension);
#else
typedef int (*globus_gsi_extension_callback_t)(
globus_gsi_callback_data_t callback_data,
const X509_EXTENSION * extension);
#endif
#ifndef DOXYGEN
globus_result_t
globus_gsi_callback_get_X509_STORE_callback_data_index(
int * index);
globus_result_t
globus_gsi_callback_get_SSL_callback_data_index(
int * index);
int
globus_gsi_callback_create_proxy_callback(
int preverify_ok,
X509_STORE_CTX * x509_context);
int
globus_gsi_callback_handshake_callback(
int preverify_ok,
X509_STORE_CTX * x509_context);
#if OPENSSL_VERSION_NUMBER < 0x40000000L
int globus_gsi_callback_check_issued(
X509_STORE_CTX * context,
X509 * cert,
X509 * issuer);
#else
int globus_gsi_callback_check_issued(
X509_STORE_CTX * context,
const X509 * cert,
const X509 * issuer);
#endif
int
globus_gsi_callback_X509_verify_cert(
X509_STORE_CTX * context,
void * arg);
globus_result_t
globus_gsi_callback_data_init(
globus_gsi_callback_data_t * callback_data);
globus_result_t
globus_gsi_callback_data_destroy(
globus_gsi_callback_data_t callback_data);
globus_result_t
globus_gsi_callback_data_copy(
globus_gsi_callback_data_t source,
globus_gsi_callback_data_t * dest);
globus_result_t
globus_gsi_callback_get_cert_depth(
globus_gsi_callback_data_t callback_data,
int * cert_depth);
globus_result_t
globus_gsi_callback_set_cert_depth(
globus_gsi_callback_data_t callback_data,
int cert_depth);
globus_result_t
globus_gsi_callback_get_proxy_depth(
globus_gsi_callback_data_t callback_data,
int * proxy_depth);
globus_result_t
globus_gsi_callback_set_proxy_depth(
globus_gsi_callback_data_t callback_data,
int proxy_depth);
globus_result_t
globus_gsi_callback_set_cert_type(
globus_gsi_callback_data_t callback_data,
globus_gsi_cert_utils_cert_type_t cert_type);
globus_result_t
globus_gsi_callback_get_cert_type(
globus_gsi_callback_data_t callback_data,
globus_gsi_cert_utils_cert_type_t * cert_type);
globus_result_t
globus_gsi_callback_get_cert_chain(
globus_gsi_callback_data_t callback_data,
STACK_OF(X509) ** cert_chain);
globus_result_t
globus_gsi_callback_set_cert_chain(
globus_gsi_callback_data_t callback_data,
STACK_OF(X509) * cert_chain);
globus_result_t
globus_gsi_callback_get_multiple_limited_proxy_ok(
globus_gsi_callback_data_t callback_data,
int * multiple_limited_proxy_ok);
globus_result_t
globus_gsi_callback_set_multiple_limited_proxy_ok(
globus_gsi_callback_data_t callback_data,
int multiple_limited_proxy_ok);
globus_result_t
globus_gsi_callback_get_extension_oids(
globus_gsi_callback_data_t callback_data,
void ** extension_oids);
globus_result_t
globus_gsi_callback_set_extension_oids(
globus_gsi_callback_data_t callback_data,
void * extension_oids);
globus_result_t
globus_gsi_callback_get_cert_dir(
globus_gsi_callback_data_t callback_data,
char ** cert_dir);
globus_result_t
globus_gsi_callback_set_cert_dir(
globus_gsi_callback_data_t callback_data,
char * cert_dir);
globus_result_t
globus_gsi_callback_get_goodtill(
globus_gsi_callback_data_t callback_data,
time_t * goodtill);
globus_result_t
globus_gsi_callback_set_goodtill(
globus_gsi_callback_data_t callback_data,
time_t goodtill);
globus_result_t
globus_gsi_callback_get_extension_cb(
globus_gsi_callback_data_t callback_data,
globus_gsi_extension_callback_t * extension_cb);
globus_result_t
globus_gsi_callback_set_extension_cb(
globus_gsi_callback_data_t callback_data,
globus_gsi_extension_callback_t extension_cb);
globus_result_t
globus_gsi_callback_get_error(
globus_gsi_callback_data_t callback_data,
globus_result_t * error);
globus_result_t
globus_gsi_callback_set_error(
globus_gsi_callback_data_t callback_data,
globus_result_t error);
globus_result_t
globus_gsi_callback_get_check_policy_for_self_signed_certs(
globus_gsi_callback_data_t callback_data,
globus_bool_t * check);
globus_result_t
globus_gsi_callback_set_check_policy_for_self_signed_certs(
globus_gsi_callback_data_t callback_data,
globus_bool_t check);
globus_result_t
globus_gsi_callback_get_allow_missing_signing_policy(
globus_gsi_callback_data_t callback_data,
globus_bool_t * allow);
globus_result_t
globus_gsi_callback_set_allow_missing_signing_policy(
globus_gsi_callback_data_t callback_data,
globus_bool_t allow);
#endif /* DOXYGEN */
#ifdef __cplusplus
}
#endif
#endif /* GLOBUS_GSI_CALLBACK_H */
globus_gsi_callback_set_proxy_depth
globus_result_t globus_gsi_callback_set_proxy_depth(globus_gsi_callback_data_t callback_data, int proxy_depth)
Set the "proxy chain" depth.
Definition globus_gsi_callback_data.c:391
globus_gsi_callback_get_cert_chain
globus_result_t globus_gsi_callback_get_cert_chain(globus_gsi_callback_data_t callback_data, STACK_OF(X509) **cert_chain)
Get the certificate chain.
Definition globus_gsi_callback_data.c:531
globus_gsi_callback_get_extension_oids
globus_result_t globus_gsi_callback_get_extension_oids(globus_gsi_callback_data_t callback_data, void **extension_oids)
Get X.509 extension OIDs.
Definition globus_gsi_callback_data.c:768
globus_gsi_callback_get_cert_depth
globus_result_t globus_gsi_callback_get_cert_depth(globus_gsi_callback_data_t callback_data, int *cert_depth)
Getting the certificate chain depth.
Definition globus_gsi_callback_data.c:243
globus_gsi_callback_data_t
struct globus_l_gsi_callback_data_s * globus_gsi_callback_data_t
Definition globus_gsi_callback.h:121
globus_gsi_callback_get_extension_cb
globus_result_t globus_gsi_callback_get_extension_cb(globus_gsi_callback_data_t callback_data, globus_gsi_extension_callback_t *extension_cb)
Get the unknown X.509 extension callback.
Definition globus_gsi_callback_data.c:968
globus_gsi_callback_set_check_policy_for_self_signed_certs
globus_result_t globus_gsi_callback_set_check_policy_for_self_signed_certs(globus_gsi_callback_data_t callback_data, globus_bool_t check)
Set the self-signed policy checking flag.
Definition globus_gsi_callback_data.c:1193
globus_gsi_callback_get_error
globus_result_t globus_gsi_callback_get_error(globus_gsi_callback_data_t callback_data, globus_result_t *error)
Get error status.
Definition globus_gsi_callback_data.c:1061
globus_gsi_callback_set_cert_type
globus_result_t globus_gsi_callback_set_cert_type(globus_gsi_callback_data_t callback_data, globus_gsi_cert_utils_cert_type_t cert_type)
Set the certificate type.
Definition globus_gsi_callback_data.c:487
globus_gsi_callback_get_cert_dir
globus_result_t globus_gsi_callback_get_cert_dir(globus_gsi_callback_data_t callback_data, char **cert_dir)
Get the trusted certificate directory.
Definition globus_gsi_callback_data.c:866
globus_gsi_callback_data_copy
globus_result_t globus_gsi_callback_data_copy(globus_gsi_callback_data_t source, globus_gsi_callback_data_t *dest)
Copy a callback data structure.
Definition globus_gsi_callback_data.c:160
globus_gsi_callback_get_check_policy_for_self_signed_certs
globus_result_t globus_gsi_callback_get_check_policy_for_self_signed_certs(globus_gsi_callback_data_t callback_data, globus_bool_t *check)
Get the self-signed policy checking flag.
Definition globus_gsi_callback_data.c:1148
globus_gsi_callback_data_init
globus_result_t globus_gsi_callback_data_init(globus_gsi_callback_data_t *callback_data)
Initialize a callback data structure.
Definition globus_gsi_callback_data.c:44
globus_gsi_callback_get_allow_missing_signing_policy
globus_result_t globus_gsi_callback_get_allow_missing_signing_policy(globus_gsi_callback_data_t callback_data, globus_bool_t *allow)
Get the "allow missing signing policy" flag.
Definition globus_gsi_callback_data.c:1238
globus_gsi_callback_set_extension_cb
globus_result_t globus_gsi_callback_set_extension_cb(globus_gsi_callback_data_t callback_data, globus_gsi_extension_callback_t extension_cb)
Definition globus_gsi_callback_data.c:1019
globus_gsi_callback_data_destroy
globus_result_t globus_gsi_callback_data_destroy(globus_gsi_callback_data_t callback_data)
Initialize a callback data structure.
Definition globus_gsi_callback_data.c:109
globus_gsi_callback_set_multiple_limited_proxy_ok
globus_result_t globus_gsi_callback_set_multiple_limited_proxy_ok(globus_gsi_callback_data_t callback_data, int multiple_limited_proxy_ok)
Set the limited proxy handling setting.
Definition globus_gsi_callback_data.c:726
globus_gsi_callback_set_error
globus_result_t globus_gsi_callback_set_error(globus_gsi_callback_data_t callback_data, globus_result_t error)
Set error status.
Definition globus_gsi_callback_data.c:1102
globus_gsi_callback_set_allow_missing_signing_policy
globus_result_t globus_gsi_callback_set_allow_missing_signing_policy(globus_gsi_callback_data_t callback_data, globus_bool_t allow)
Set the "allow missing signing policy" flag.
Definition globus_gsi_callback_data.c:1282
globus_gsi_callback_get_proxy_depth
globus_result_t globus_gsi_callback_get_proxy_depth(globus_gsi_callback_data_t callback_data, int *proxy_depth)
Get the "proxy chain" depth.
Definition globus_gsi_callback_data.c:338
globus_gsi_callback_get_multiple_limited_proxy_ok
globus_result_t globus_gsi_callback_get_multiple_limited_proxy_ok(globus_gsi_callback_data_t callback_data, int *multiple_limited_proxy_ok)
Get the limited proxy handling setting.
Definition globus_gsi_callback_data.c:669
globus_gsi_callback_set_extension_oids
globus_result_t globus_gsi_callback_set_extension_oids(globus_gsi_callback_data_t callback_data, void *extension_oids)
Set X.509 extension OIDs.
Definition globus_gsi_callback_data.c:821
globus_gsi_callback_set_cert_chain
globus_result_t globus_gsi_callback_set_cert_chain(globus_gsi_callback_data_t callback_data, STACK_OF(X509) *cert_chain)
Set the certificate chain.
Definition globus_gsi_callback_data.c:600
globus_gsi_callback_set_cert_depth
globus_result_t globus_gsi_callback_set_cert_depth(globus_gsi_callback_data_t callback_data, int cert_depth)
Set the certificate chain depth.
Definition globus_gsi_callback_data.c:296
globus_gsi_callback_get_cert_type
globus_result_t globus_gsi_callback_get_cert_type(globus_gsi_callback_data_t callback_data, globus_gsi_cert_utils_cert_type_t *cert_type)
Get the certificate type.
Definition globus_gsi_callback_data.c:434
globus_gsi_callback_set_cert_dir
globus_result_t globus_gsi_callback_set_cert_dir(globus_gsi_callback_data_t callback_data, char *cert_dir)
Set the trusted certificate directory.
Definition globus_gsi_callback_data.c:920
globus_gsi_callback_check_issued
int globus_gsi_callback_check_issued(X509_STORE_CTX *context, X509 *cert, X509 *issuer)
OpenSSL X509_check_issued() wrapper.
Definition globus_gsi_callback.c:594
globus_gsi_callback_create_proxy_callback
int globus_gsi_callback_create_proxy_callback(int preverify_ok, X509_STORE_CTX *x509_context)
Independent path validation callback.
Definition globus_gsi_callback.c:433
globus_gsi_callback_X509_verify_cert
int globus_gsi_callback_X509_verify_cert(X509_STORE_CTX *context, void *arg)
Certificate verify wrapper.
Definition globus_gsi_callback.c:374
globus_gsi_callback_get_SSL_callback_data_index
globus_result_t globus_gsi_callback_get_SSL_callback_data_index(int *index)
Get callback data index from SSL structure.
Definition globus_gsi_callback.c:341
globus_gsi_callback_get_X509_STORE_callback_data_index
globus_result_t globus_gsi_callback_get_X509_STORE_callback_data_index(int *index)
Get callback data index from X509_STORE.
Definition globus_gsi_callback.c:311
globus_gsi_callback_handshake_callback
int globus_gsi_callback_handshake_callback(int preverify_ok, X509_STORE_CTX *x509_context)
SSL path validation callback.
Definition globus_gsi_callback.c:508
globus_gsi_extension_callback_t
int(* globus_gsi_extension_callback_t)(globus_gsi_callback_data_t callback_data, X509_EXTENSION *extension)
Definition globus_gsi_callback.h:129