OpenSSL  1.0.1c
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Classes | Macros | Functions
err.c File Reference
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include "cryptlib.h"
#include <openssl/lhash.h>
#include <openssl/crypto.h>
#include <openssl/buffer.h>
#include <openssl/bio.h>
#include <openssl/err.h>

Go to the source code of this file.

Classes

struct  st_ERR_FNS
 

Macros

#define ERRFN(a)   err_fns->cb_##a
 
#define NUM_SYS_STR_REASONS   127
 
#define LEN_SYS_STR_REASON   32
 
#define err_clear_data(p, i)
 
#define err_clear(p, i)
 
#define NUM_COLONS   4
 

Functions

 DECLARE_LHASH_OF (ERR_STRING_DATA)
 
 DECLARE_LHASH_OF (ERR_STATE)
 
const ERR_FNSERR_get_implementation (void)
 
int ERR_set_implementation (const ERR_FNS *fns)
 
void ERR_load_ERR_strings (void)
 
void ERR_load_strings (int lib, ERR_STRING_DATA *str)
 
void ERR_unload_strings (int lib, ERR_STRING_DATA *str)
 
void ERR_free_strings (void)
 
void ERR_put_error (int lib, int func, int reason, const char *file, int line)
 
void ERR_clear_error (void)
 
unsigned long ERR_get_error (void)
 
unsigned long ERR_get_error_line (const char **file, int *line)
 
unsigned long ERR_get_error_line_data (const char **file, int *line, const char **data, int *flags)
 
unsigned long ERR_peek_error (void)
 
unsigned long ERR_peek_error_line (const char **file, int *line)
 
unsigned long ERR_peek_error_line_data (const char **file, int *line, const char **data, int *flags)
 
unsigned long ERR_peek_last_error (void)
 
unsigned long ERR_peek_last_error_line (const char **file, int *line)
 
unsigned long ERR_peek_last_error_line_data (const char **file, int *line, const char **data, int *flags)
 
void ERR_error_string_n (unsigned long e, char *buf, size_t len)
 
char * ERR_error_string (unsigned long e, char *ret)
 
 LHASH_OF (ERR_STATE)
 
void ERR_release_err_state_table (LHASH_OF(ERR_STATE)**hash)
 
const char * ERR_lib_error_string (unsigned long e)
 
const char * ERR_func_error_string (unsigned long e)
 
const char * ERR_reason_error_string (unsigned long e)
 
void ERR_remove_thread_state (const CRYPTO_THREADID *id)
 
void ERR_remove_state (unsigned long pid)
 
ERR_STATEERR_get_state (void)
 
int ERR_get_next_error_library (void)
 
void ERR_set_error_data (char *data, int flags)
 
void ERR_add_error_data (int num,...)
 
void ERR_add_error_vdata (int num, va_list args)
 
int ERR_set_mark (void)
 
int ERR_pop_to_mark (void)
 

Macro Definition Documentation

#define err_clear (   p,
 
)
Value:
do { \
(p)->err_flags[i]=0; \
(p)->err_buffer[i]=0; \
err_clear_data(p,i); \
(p)->err_file[i]=NULL; \
(p)->err_line[i]= -1; \
} while(0)

Definition at line 635 of file err.c.

#define err_clear_data (   p,
 
)
Value:
do { \
if (((p)->err_data[i] != NULL) && \
(p)->err_data_flags[i] & ERR_TXT_MALLOCED) \
{ \
OPENSSL_free((p)->err_data[i]); \
(p)->err_data[i]=NULL; \
} \
(p)->err_data_flags[i]=0; \
} while(0)

Definition at line 624 of file err.c.

#define ERRFN (   a)    err_fns->cb_##a

Definition at line 277 of file err.c.

#define LEN_SYS_STR_REASON   32

Definition at line 561 of file err.c.

#define NUM_COLONS   4
#define NUM_SYS_STR_REASONS   127

Definition at line 560 of file err.c.

Function Documentation

DECLARE_LHASH_OF ( ERR_STRING_DATA  )
DECLARE_LHASH_OF ( ERR_STATE  )
void ERR_add_error_data ( int  num,
  ... 
)

Definition at line 1066 of file err.c.

void ERR_add_error_vdata ( int  num,
va_list  args 
)

Definition at line 1074 of file err.c.

void ERR_clear_error ( void  )

Definition at line 742 of file err.c.

char* ERR_error_string ( unsigned long  e,
char *  ret 
)

Definition at line 912 of file err.c.

void ERR_error_string_n ( unsigned long  e,
char *  buf,
size_t  len 
)

Definition at line 860 of file err.c.

void ERR_free_strings ( void  )

Definition at line 698 of file err.c.

const char* ERR_func_error_string ( unsigned long  e)

Definition at line 952 of file err.c.

unsigned long ERR_get_error ( void  )

Definition at line 757 of file err.c.

unsigned long ERR_get_error_line ( const char **  file,
int *  line 
)

Definition at line 760 of file err.c.

unsigned long ERR_get_error_line_data ( const char **  file,
int *  line,
const char **  data,
int *  flags 
)

Definition at line 764 of file err.c.

const ERR_FNS* ERR_get_implementation ( void  )

Definition at line 303 of file err.c.

int ERR_get_next_error_library ( void  )

Definition at line 1044 of file err.c.

ERR_STATE* ERR_get_state ( void  )

Definition at line 1004 of file err.c.

const char* ERR_lib_error_string ( unsigned long  e)

Definition at line 940 of file err.c.

void ERR_load_ERR_strings ( void  )

Definition at line 658 of file err.c.

void ERR_load_strings ( int  lib,
ERR_STRING_DATA str 
)

Definition at line 681 of file err.c.

unsigned long ERR_peek_error ( void  )

Definition at line 769 of file err.c.

unsigned long ERR_peek_error_line ( const char **  file,
int *  line 
)

Definition at line 772 of file err.c.

unsigned long ERR_peek_error_line_data ( const char **  file,
int *  line,
const char **  data,
int *  flags 
)

Definition at line 775 of file err.c.

unsigned long ERR_peek_last_error ( void  )

Definition at line 780 of file err.c.

unsigned long ERR_peek_last_error_line ( const char **  file,
int *  line 
)

Definition at line 783 of file err.c.

unsigned long ERR_peek_last_error_line_data ( const char **  file,
int *  line,
const char **  data,
int *  flags 
)

Definition at line 786 of file err.c.

int ERR_pop_to_mark ( void  )

Definition at line 1121 of file err.c.

void ERR_put_error ( int  lib,
int  func,
int  reason,
const char *  file,
int  line 
)

Definition at line 706 of file err.c.

const char* ERR_reason_error_string ( unsigned long  e)

Definition at line 965 of file err.c.

void ERR_release_err_state_table ( LHASH_OF(ERR_STATE)**  hash)

Definition at line 934 of file err.c.

void ERR_remove_state ( unsigned long  pid)

Definition at line 998 of file err.c.

void ERR_remove_thread_state ( const CRYPTO_THREADID id)

Definition at line 983 of file err.c.

void ERR_set_error_data ( char *  data,
int  flags 
)

Definition at line 1050 of file err.c.

int ERR_set_implementation ( const ERR_FNS fns)

Definition at line 309 of file err.c.

int ERR_set_mark ( void  )

Definition at line 1110 of file err.c.

void ERR_unload_strings ( int  lib,
ERR_STRING_DATA str 
)

Definition at line 687 of file err.c.

LHASH_OF ( ERR_STATE  )

Definition at line 928 of file err.c.