globus_i_error_openssl.h

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 
00017 #ifndef GLOBUS_I_ERROR_OPENSSL_H
00018 #define GLOBUS_I_ERROR_OPENSSL_H
00019 
00020 #ifndef GLOBUS_DONT_DOCUMENT_INTERNAL
00021 
00027 #include "globus_error_openssl.h"
00028 
00029 
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif
00033 
00034 
00035 #ifdef BUILD_DEBUG
00036 extern int globus_i_gsi_openssl_error_debug_level;
00037 
00038 #define GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG(_LEVEL_) \
00039     (globus_i_gsi_openssl_error_debug_level >= (_LEVEL_))
00040 
00041 #define GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG_FPRINTF(_LEVEL_, _MESSAGE_) \
00042     { \
00043         if (GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG(_LEVEL_)) \
00044         { \
00045            globus_libc_fprintf _MESSAGE_; \
00046         } \
00047     }
00048 
00049 
00050 #define GLOBUS_I_GSI_GSSAPI_DEBUG_FNPRINTF(_LEVEL_, _MESSAGE_) \
00051 { \
00052         if (GLOBUS_I_GSI_GSSAPI_DEBUG(_LEVEL_)) \
00053         { \
00054            char *                       _tmp_str_ = \
00055                globus_common_create_nstring _MESSAGE_; \
00056            globus_libc_fprintf(globus_i_gsi_gssapi_debug_fstream, \
00057                                _tmp_str_); \
00058            globus_libc_free(_tmp_str_); \
00059         } \
00060 }
00061 
00062 #define GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG_ENTER \
00063             GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG_FPRINTF( \
00064                 1, (stderr, "%s entering\n", _function_name_))
00065 
00066 #define GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG_EXIT \
00067             GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG_FPRINTF( \
00068                 1, (stderr, "%s exiting\n", _function_name_))
00069 
00070 #else
00071 
00072 #define GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG_FPRINTF(_LEVEL_, _MESSAGE_) {}
00073 #define GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG_FNPRINTF(_LEVEL_, _MESSAGE_) {}
00074 #define GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG_ENTER {}
00075 #define GLOBUS_I_GSI_OPENSSL_ERROR_DEBUG_EXIT  {}
00076 
00077 #endif
00078 
00079 
00080 typedef struct globus_l_openssl_error_handle_s 
00081 {
00082     unsigned long                       error_code;
00083     const char *                        filename;
00084     int                                 linenumber;
00085     const char *                        data;
00086     int                                 flags;
00087 } globus_i_openssl_error_handle_t;
00088 
00089 globus_openssl_error_handle_t
00090 globus_i_openssl_error_handle_init(void);
00091 
00092 void
00093 globus_i_openssl_error_handle_destroy(
00094     globus_openssl_error_handle_t       handle);
00095 
00096 #ifdef __cplusplus
00097 }
00098 #endif
00099 
00100 #endif /* GLOBUS_DONT_DOCUMENT_INTERNAL */
00101 
00102 #endif /* GLOBUS_I_ERROR_OPENSSL_H */

Generated on 27 Oct 2014 for globus_gsi_openssl_error by  doxygen 1.4.7