hx509_print(3)

πŸ“¦
version 7.8.0 Β· 3 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, epel 10, epel 9, fedora 43, fedora 44

πŸ’– hx509_print β€” hx509 printing functions πŸ’–

okay bestie, welcome to hx509_print(3), straight out of the Heimdal x509 library ✨ this is the whole printing squad β€” everything you need to make certificates, OIDs and bitstrings go print print print πŸŽ€


🌸 SYNOPSIS 🌸

here's the whole friend group, no cap πŸ‘‘

void hx509_print_stdout (void *ctx, const char *fmt, va_list va)
int hx509_oid_sprint (const heim_oid *oid, char **str)
void hx509_oid_print (const heim_oid *oid, hx509_vprint_func func, void *ctx)
void hx509_bitstring_print (const heim_bit_string *b, hx509_vprint_func func, void *ctx)
int hx509_cert_keyusage_print (hx509_context context, hx509_cert c, char **s)
int hx509_validate_ctx_init (hx509_context context, hx509_validate_ctx *ctx)
void hx509_validate_ctx_set_print (hx509_validate_ctx ctx, hx509_vprint_func func, void *c)
void hx509_validate_ctx_add_flags (hx509_validate_ctx ctx, int flags)
void hx509_validate_ctx_free (hx509_validate_ctx ctx)
int hx509_validate_cert (hx509_context context, hx509_validate_ctx ctx, hx509_cert cert)

πŸ¦‹ Detailed Description πŸ¦‹

it's giving… functions. the details live right below, babe πŸ’…

🌈 Function Documentation 🌈

✨ void hx509_bitstring_print (const heim_bit_string * b, hx509_vprint_func func, void * ctx) ✨

prints a bitstring using a hx509_vprint_func function πŸ–¨οΈ and if you wanna print to stdout, just use hx509_print_stdout() β€” she's the plug, iykyk.

Parameters

  • b β€” the bit string to print.
  • func β€” the hx509_vprint_func to print with.
  • ctx β€” the context variable handed to the hx509_vprint_func function.

✨ int hx509_cert_keyusage_print (hx509_context context, hx509_cert c, char ** s) ✨

prints the certificate usage for a certificate into a string πŸŽ€

Parameters

  • context β€” a hx509 context.
  • c β€” a certificate, print the keyusage for it.
  • s β€” the return string with the keyusage printed into it. free it with hx509_xfree().

Returns

an hx509 error code β€” go peep hx509_get_error_string() for the tea πŸ‘€


✨ void hx509_oid_print (const heim_oid * oid, hx509_vprint_func func, void * ctx) ✨

prints an oid using a hx509_vprint_func function 🌟 and to print to stdout, use hx509_print_stdout().

Parameters

  • oid β€” the oid to print.
  • func β€” the hx509_vprint_func to print with.
  • ctx β€” the context variable handed to the hx509_vprint_func function.

✨ int hx509_oid_sprint (const heim_oid * oid, char ** str) ✨

prints an oid into a string πŸ’«

Parameters

  • oid β€” the oid to print.
  • str β€” the allocated string. free it with hx509_xfree().

Returns

an hx509 error code β€” check hx509_get_error_string() 🫢


✨ void hx509_print_stdout (void * ctx, const char * fmt, va_list va) ✨

the lil helper function that prints on stdout, made for:

  • hx509_oid_print(),
  • hx509_bitstring_print(),
  • hx509_validate_ctx_set_print().

Parameters

  • ctx β€” the context passed to the print function. if ctx is NULL, stdout is used. periodt.
  • fmt β€” the printing format.
  • va β€” the argument list.

✨ int hx509_validate_cert (hx509_context context, hx509_validate_ctx ctx, hx509_cert cert) ✨

validates / prints the status of the certificate πŸ” main character energy fr fr.

Parameters

  • context β€” a hx509 context.
  • ctx β€” a hx509 validation context.
  • cert β€” the certificate to validate/print.

Returns

an hx509 error code β€” see hx509_get_error_string() ⭐


✨ void hx509_validate_ctx_add_flags (hx509_validate_ctx ctx, int flags) ✨

adds flags that control the behavior of the hx509_validate_cert() function 🚩

Parameters

  • ctx β€” a hx509 validation context.
  • flags β€” the flags to add to the validation context.

Returns

an hx509 error code β€” see hx509_get_error_string() πŸ’œ


✨ void hx509_validate_ctx_free (hx509_validate_ctx ctx) ✨

frees a hx509 validate context 🫧 bye bestie, you served.

Parameters

  • ctx β€” the hx509 validate context to free.

✨ int hx509_validate_ctx_init (hx509_context context, hx509_validate_ctx * ctx) ✨

allocates a hx509 validation/printing context 🌱

Parameters

  • context β€” a hx509 context.
  • ctx β€” a newly allocated hx509 validation context. free it with hx509_validate_ctx_free().

Returns

an hx509 error code β€” see hx509_get_error_string() 🌸


✨ void hx509_validate_ctx_set_print (hx509_validate_ctx ctx, hx509_vprint_func func, void * c) ✨

sets the printing functions for the validation context πŸ–¨οΈβœ¨

Parameters

  • ctx β€” a hx509 validation context.
  • func β€” the printing function to use.
  • c β€” the context variable passed to the printing function.

Returns

an hx509 error code β€” see hx509_get_error_string() πŸ“


πŸ‘‘ Author πŸ‘‘

generated automatically by Doxygen for the Heimdal x509 library, pulled straight from the source code πŸ€–πŸ’–


and that's the whole page, bestie πŸ’… Version 7.8.0, dated Tue Nov 15 2022 β€” slay, go print some certs πŸŽ€πŸ¦‹βœ¨
πŸ“¦ where this page comes from