keyhole logo

Functions
hx509 error functions

Functions

void hx509_clear_error_string (hx509_context context)
 
void hx509_set_error_stringv (hx509_context context, int flags, int code, const char *fmt, va_list ap)
 
void hx509_set_error_string (hx509_context context, int flags, int code, const char *fmt,...)
 
char * hx509_get_error_string (hx509_context context, int error_code)
 
void hx509_free_error_string (char *str)
 
void hx509_err (hx509_context context, int exit_code, int error_code, const char *fmt,...)
 

Detailed Description

See the Hx509 error reporting functions for description and examples.

Function Documentation

◆ hx509_clear_error_string()

void hx509_clear_error_string ( hx509_context  context)

Resets the error strings the hx509 context.

Parameters
contextA hx509 context.

◆ hx509_err()

void hx509_err ( hx509_context  context,
int  exit_code,
int  error_code,
const char *  fmt,
  ... 
)

Print error message and fatally exit from error code

Parameters
contextA hx509 context.
exit_codeexit() code from process.
error_codeError code for the reason to exit.
fmtformat string with the exit message.
...argument to format string.

◆ hx509_free_error_string()

void hx509_free_error_string ( char *  str)

Free error string returned by hx509_get_error_string().

Parameters
strerror string to free.

◆ hx509_get_error_string()

char* hx509_get_error_string ( hx509_context  context,
int  error_code 
)

Get an error string from context associated with error_code.

Parameters
contextA hx509 context.
error_codeGet error message for this error code.
Returns
error string, free with hx509_free_error_string().

◆ hx509_set_error_string()

void hx509_set_error_string ( hx509_context  context,
int  flags,
int  code,
const char *  fmt,
  ... 
)

See hx509_set_error_stringv().

Parameters
contextA hx509 context.
flags
  • HX509_ERROR_APPEND appends the error string to the old messages (code is updated).
codeerror code related to error message
fmterror message format
...arguments to error message format

◆ hx509_set_error_stringv()

void hx509_set_error_stringv ( hx509_context  context,
int  flags,
int  code,
const char *  fmt,
va_list  ap 
)

Add an error message to the hx509 context.

Parameters
contextA hx509 context.
flags
  • HX509_ERROR_APPEND appends the error string to the old messages (code is updated).
codeerror code related to error message
fmterror message format
aparguments to error message format

Generated on Tue Nov 15 2022 14:04:25 for Heimdal x509 library by doxygen 1.9.1