hx509_name(3)
π hx509_name β the hx509 name functions, bestie π
okay so this is a page from the Heimdal x509 library manpages, and it's all about handling names in hx509. Names are literally the main character of certificates, so yeah, this matters. let's get into it π«Ά
πΈ NAME πΈ
hx509_name β hx509 name functions. that's it, that's the vibe. β¨
β¨ SYNOPSIS β¨
π Functions π
here's the whole roster, no cap:
int hx509_name_to_string (const hx509_name name, char **str)
int hx509_name_cmp (hx509_name n1, hx509_name n2)
int hx509_parse_name (hx509_context context, const char *str, hx509_name
*name)
int hx509_name_copy (hx509_context context, const hx509_name from,
hx509_name *to)
int hx509_name_to_Name (const hx509_name from, Name *to)
int hx509_name_expand (hx509_context context, hx509_name name, hx509_env
env)
void hx509_name_free (hx509_name *name)
int hx509_unparse_der_name (const void *data, size_t length, char **str)
int hx509_name_binary (const hx509_name name, heim_octet_string *os)
int hx509_name_is_null_p (const hx509_name name)
int hx509_general_name_unparse (GeneralName *name, char **str)
π¦ Detailed Description π¦
fr fr, if you want the actual description and examples, go read the PKIX/X.509 Names section. that's where the lore lives. π
π Function Documentation π
int hx509_general_name_unparse (GeneralName * name, char ** str)
takes the hx509 name chilling in name and unparses it into a string. it's giving "make it readable." π
Parameters
nameβ the name you wanna printstrβ an allocated string; this hands you back the name in string form
Returns
An hx509 error code β peep hx509_get_error_string() if you need the deets. π
int hx509_name_binary (const hx509_name name, heim_octet_string * os)
converts an hx509_name object into a DER encoded name. glow-up but make it bytes. β
Parameters
nameβ the name to convertosβ data to a DER encoded name. and bestie, you gotta free the resulting octet string withhx509_xfree(os->data). don't leave it hanging, that's not the move π
Returns
An hx509 error code β see hx509_get_error_string(). π
int hx509_name_cmp (hx509_name n1, hx509_name n2)
compares two hx509 name objects. super useful for sorting, iykyk. π
Parameters
n1β an hx509 name object.n2β an hx509 name object.
Returns
0 means the objects are the same. it returns > 0 if n2 is 'larger', and < 0 if n1 is 'smaller' than n2. periodt. π
int hx509_name_copy (hx509_context context, const hx509_name from, hx509_name * to)
copies an hx509 name object. dupe, but make it legal. β¨
Parameters
contextβ an hx509 context.fromβ the name to copy fromtoβ the name to copy to
Returns
An hx509 error code β see hx509_get_error_string(). π
int hx509_name_expand (hx509_context context, hx509_name name, hx509_env env)
expands variables in the name using env. the variables are on the form ${name}. this is lowkey the move when you're dealing with certificate templates. π§
Parameters
contextβ an hx509 context.nameβ the name to expand.envβ environment variable to expand.
Returns
An hx509 error code β see hx509_get_error_string(). π
β οΈ heads up: only UTF8String rdnSequence names are allowed. that's the rule, no exceptions. π
void hx509_name_free (hx509_name * name)
frees an hx509 name object. and upon return, *name will be NULL β clean, iconic, no dangling anything. π
Parameters
nameβ an hx509 name object to be freed.
int hx509_name_is_null_p (const hx509_name name)
unparses the hx509 name in name into a string. (yes bestie, that's what the page says, we're not editing the lore π)
Parameters
nameβ the name to check if it's empty/null.
Returns
non-zero if the name is empty/null. so like, truthy means it's giving nothing. π
int hx509_name_to_Name (const hx509_name from, Name * to)
converts an hx509_name into a Name. glow-up to a different type, slay. π
Parameters
fromβ the name to copy fromtoβ the name to copy to
Returns
An hx509 error code β see hx509_get_error_string(). π
int hx509_name_to_string (const hx509_name name, char ** str)
converts the hx509 name object into a printable string. cute and readable, we love that. πΈ
Parameters
nameβ name to printstrβ the string to return
Returns
An hx509 error code β see hx509_get_error_string(). π
π real talk: the resulting string should be freed with free().
int hx509_parse_name (hx509_context context, const char * str, hx509_name * name)
parses a string into an hx509 name object. string goes in, name object comes out, main character energy. β¨
Parameters
contextβ an hx509 context.strβ a string to parse.nameβ the resulting object,NULLin case of error.
Returns
An hx509 error code β see hx509_get_error_string(). π
int hx509_unparse_der_name (const void * data, size_t length, char ** str)
converts a DER encoded name into a string. bytes to vibes. π¦
Parameters
dataβ data to a DER/BER encoded namelengthβ length ofdatastrβ the resulting string, isNULLon failure.
Returns
An hx509 error code β see hx509_get_error_string(). π
π Author π
generated automatically by Doxygen for the Heimdal x509 library, straight from the source code. the bots did their thing, no cap. π€β¨
and that's the whole page bestie!! π«Ά this was Version 7.8.0, dated Tue Nov 15 2022 β so yeah, slightly vintage but still eating. mwah, go read your certs responsibly π ππ
π¦ 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