/usr/include/globus/globus_error_openssl.h is in libglobus-gsi-openssl-error-dev 3.5-5.
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 | /*
* Copyright 1999-2013 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_INCLUDE_OPENSSL_ERROR_H
#define GLOBUS_INCLUDE_OPENSSL_ERROR_H
/**
* @file globus_error_openssl.h
* @brief Globus Generic Error
*/
#ifndef GLOBUS_GLOBAL_DOCUMENT_SET
/**
* @mainpage Globus OpenSSL Error API
* @copydoc globus_openssl_error_api
*/
#endif
/**
* @defgroup globus_openssl_error_api Globus OpenSSL Error API
*
* The globus_gsi_openssl_error functions provide a wrapper to error
* types defined by OpenSSL. The types and prototypes for the
* globus_gsi_openssl_error library are defined in the
* globus_error_openssl.h header. Applications which use these functions
* must link with the libglobus_openssl_error library. The library is
* distributed with a pkg-config module called globus-gsi-openssl-error
* to automatically find header and library paths.
*
* @section globus_gsi_openssl_error_activation_section Library Initialization
* @copydoc globus_gsi_openssl_error_activation
* @section globus_openssl_error_object_section Error Object Data Definition
* @copydoc globus_openssl_error_object
* @section globus_openssl_error_utility_section Error Object Manipulators
* @copydoc globus_openssl_error_utility
*/
#include "globus_common.h"
#include "globus_error_generic.h"
#include "openssl/err.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
@defgroup globus_gsi_openssl_error_activation Activation
@ingroup globus_openssl_error_api
Globus GSI OpenSSL Error uses standard Globus module activation and
deactivation. Before any Globus GSI OpenSSL Error functions are called, the
following function must be called:
@code
globus_module_activate(GLOBUS_GSI_OPENSSL_ERROR_MODULE)
@endcode
This function returns GLOBUS_SUCCESS if Globus GSI OpenSSL Error was
successfully initialized, and you are therefore allowed to
subsequently call Globus GSI OpenSSL Error functions. Otherwise, an error
code is returned, and Globus GSI OpenSSL Error functions should not be
subsequently called. This function may be called multiple times.
To deactivate Globus GSI OpenSSL Error, the
following function must be called:
@code
globus_module_deactivate(GLOBUS_GSI_OPENSSL_ERROR_MODULE)
@endcode
This function should be called once for each time Globus GSI OpenSSL Error
was activated.
*/
/** Module descriptor
* @ingroup globus_gsi_openssl_error_activation
* @hideinitializer
*/
#define GLOBUS_GSI_OPENSSL_ERROR_MODULE (&globus_i_gsi_openssl_error_module)
extern
globus_module_descriptor_t globus_i_gsi_openssl_error_module;
/** Error type definition
* @ingroup globus_openssl_error_object
* @hideinitializer
*/
#define GLOBUS_ERROR_TYPE_OPENSSL \
(&GLOBUS_ERROR_TYPE_OPENSSL_DEFINITION)
extern const globus_object_type_t GLOBUS_ERROR_TYPE_OPENSSL_DEFINITION;
#define _GOESL(s) globus_common_i18n_get_string(\
GLOBUS_GSI_OPENSSL_ERROR_MODULE, \
s)
/**
* @defgroup globus_openssl_error_object Globus OpenSSL Error Object
* @ingroup globus_openssl_error_api
*
* The globus_openssl_error_handle_t is an opaque structure pointer which
* contains information about the OpenSSL call which generated an error. The
* functions in the @link globus_openssl_error_object Globus OpenSSL Error Object @endlink section of
* the API are used to create, manipulate, and destroy Globus
* OpenSSL Error object data.
*/
typedef struct globus_l_openssl_error_handle_s *
globus_openssl_error_handle_t;
unsigned long
globus_openssl_error_handle_get_error_code(
globus_openssl_error_handle_t error_code);
const char *
globus_openssl_error_handle_get_filename(
globus_openssl_error_handle_t handle);
int
globus_openssl_error_handle_get_linenumber(
globus_openssl_error_handle_t handle);
const char *
globus_openssl_error_handle_get_library(
globus_openssl_error_handle_t handle);
const char *
globus_openssl_error_handle_get_function(
globus_openssl_error_handle_t handle);
const char *
globus_openssl_error_handle_get_reason(
globus_openssl_error_handle_t handle);
const char *
globus_openssl_error_handle_get_data(
globus_openssl_error_handle_t handle);
int
globus_openssl_error_handle_get_data_flags(
globus_openssl_error_handle_t handle);
globus_object_t *
globus_error_construct_openssl_error(
globus_module_descriptor_t * base_source,
globus_object_t * base_cause);
globus_object_t *
globus_error_initialize_openssl_error(
globus_object_t * error,
globus_module_descriptor_t * base_source,
globus_object_t * base_cause,
globus_openssl_error_handle_t openssl_error_handle);
/**
* @defgroup globus_openssl_error_utility Error Object Helper Functions
* @ingroup globus_openssl_error_api
*
* The functions in the @link globus_openssl_error_utility Error Object Helper Functions @endlink section
* deal with Globus error objects constructed with OpenSSL error data.
* These functions manipulate the generic globus_object_t representation
* of an OpenSSL error.
*/
globus_object_t *
globus_error_wrap_openssl_error(
globus_module_descriptor_t * base_source,
int error_type,
const char * source_file,
const char * source_func,
int source_line,
const char * format,
...);
globus_bool_t
globus_error_match_openssl_error(
globus_object_t * error,
unsigned long library,
unsigned long function,
unsigned long reason);
const char *
globus_error_openssl_error_get_filename(
globus_object_t * error);
int
globus_error_openssl_error_get_linenumber(
globus_object_t * error);
const char *
globus_error_openssl_error_get_library(
globus_object_t * error);
const char *
globus_error_openssl_error_get_function(
globus_object_t * error);
const char *
globus_error_openssl_error_get_reason(
globus_object_t * error);
const char *
globus_error_openssl_error_get_data(
globus_object_t * error);
int
globus_error_openssl_error_get_data_flags(
globus_object_t * error);
#ifdef __cplusplus
}
#endif
#endif /* GLOBUS_INCLUDE_OPENSSL_ERROR_H */
|