hx509_error(3)
β¨ NAME β¨
hx509_error β the hx509 error functions, aka the part of the Heimdal x509 library that handles all your "wait what went wrong π" moments. This is page 3 of the manual, bestie, and it's all about error strings. π
π¦ SYNOPSIS π¦
the functions, all six of them, no skips π«Ά
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 π
okay so if you want the actual tea β the full description plus examples β go read the Hx509 error reporting functions. That's where it's at. This page is just the receipts. β¨
π FUNCTION DOCUMENTATION π
void hx509_clear_error_string (hx509_context context)
Resets the error strings the hx509 context. like a lil factory reset for your error messages, but only the error messages π§Ήβ¨
Parameters
contextβ A hx509 context.
void hx509_err (hx509_context context, int exit_code, int error_code, const char * fmt, ...)
Print error message and fatally exit from error code. yes bestie, fatally β this one does not come back. it prints and then it's gone π dramatic but honest.
Parameters
contextβ A hx509 context.exit_codeβexit()code from process.error_codeβ Error code for the reason to exit.fmtβ format string with the exit message....β argument to format string.
void hx509_free_error_string (char * str)
Free error string returned by hx509_get_error_string(). clean up after yourself, it's giving basic hygiene π«Ά
Parameters
strβ error string to free.
char* hx509_get_error_string (hx509_context context, int error_code)
Get an error string from context associated with error_code. the little lookup that tells you what actually happened π
Parameters
contextβ A hx509 context.error_codeβ Get error message for this error code.
Returns
error string, free with hx509_free_error_string().
not me reminding you again: you must free it with hx509_free_error_string(). no cap, that's a leak otherwise πΈ
void hx509_set_error_string (hx509_context context, int flags, int code, const char * fmt, ...)
See hx509_set_error_stringv(). same energy, just the variadic glow-up β¨
Parameters
contextβ A hx509 context.flagsHX509_ERROR_APPENDappends the error string to the old messages (code is updated).
codeβ error code related to error messagefmtβ error message format...β arguments to error message format
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. stacking messages like a group chat thread π±
Parameters
contextβ A hx509 context.flagsHX509_ERROR_APPENDappends the error string to the old messages (code is updated).
codeβ error code related to error messagefmtβ error message formatapβ arguments to error message format
π AUTHOR π
Generated automatically by Doxygen for Heimdal x509 library from the source code. the robots did this one, not me ππ
okay that's the whole page bestie, and here's the cute lil sign-off: this is Version 7.8.0, dated Tue Nov 15 2022 β so like, retro but still iconic β¨ππ¦ thanks for reading, go handle your errors responsibly, mwah π
π¦ where this page comes from
- alpine 3.22: heimdal-doc 7.8.0-r4 Β· BSD-3-Clause
- alpine 3.23: heimdal-doc 7.8.0-r5 Β· BSD-3-Clause
- alpine 3.24: heimdal-doc 7.8.0-r5 Β· BSD-3-Clause
- epel 10: heimdal-devel 7.8.0-26.el10_2 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- epel 9: heimdal-devel 7.8.0-5.el9 Β· BSD and MIT
- fedora 43: heimdal-devel 7.8.0-26.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 43: heimdal-devel 7.8.0-26.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 44: heimdal-devel 7.8.0-26.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 44: heimdal-devel 7.8.0-26.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 44: heimdal-devel 7.8.0-28.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 44: heimdal-devel 7.8.0-28.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms