GNUTLS_PKCS11_GET_RAW_ISSUER_BY_DN(3)

πŸ’– gnutls_pkcs11_get_raw_issuer_by_dn(3) πŸ’–

okay bestie, welcome to the gnutls manual β€” this one's page for gnutls_pkcs11_get_raw_issuer_by_dn, a certified API function that goes digging through your PKCS 11 token for the issuer cert matching a DN. yes it's a mouthful. no we're not shortening it. iykyk 🫢


✨ NAME ✨

gnutls_pkcs11_get_raw_issuer_by_dn β€” API function. that's it, that's the name, and yes it's a whole entire sentence πŸ’…


🌈 SYNOPSIS 🌈

#include <gnutls/pkcs11.h>

int gnutls_pkcs11_get_raw_issuer_by_dn(const char * url, const
gnutls_datum_t * dn, gnutls_datum_t * issuer, gnutls_x509_crt_fmt_t fmt,
unsigned int flags);

she's long, she's specific, she ate. πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • const char * url β€” a PKCS 11 url that identifies a token. this is your "where do i even look" pointer, periodt.
  • const gnutls_datum_t * dn β€” the DN you're searching for. the whole reason we're here.
  • gnutls_datum_t * issuer β€” will hold the issuer if any, in an allocated buffer. so like, she allocates, you're responsible for her later. main character energy but also a little high-maintenance 😭
  • gnutls_x509_crt_fmt_t fmt β€” the format of the exported issuer. you pick, she delivers.
  • unsigned int flags β€” use zero, or flags from GNUTLS_PKCS11_OBJ_FLAG. your call bestie.

πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the tea: this function will return the certificate with the given DN, if it is stored in the token. πŸ“

by default, only things marked as trusted issuers get returned. like, she has standards. if you want any issuer to come back, you gotta specify GNUTLS_PKCS11_OBJ_FLAG_RETRIEVE_ANY in flags. no cap.

and the name of the function includes issuer because it can be used to discover issuers of certificates. that's the whole lore. lowkey iconic of her to explain herself. πŸ’œ


πŸ’€ RETURNS πŸ’€

on success, GNUTLS_E_SUCCESS (0) is returned. otherwise you get a negative error value, which is the universe's way of saying "not today." πŸ™ˆ


⭐ SINCE ⭐

3.4.0 β€” she's been here since 3.4.0, she's an elder, show some respect 🧚


πŸŽ€ REPORTING BUGS πŸŽ€

report bugs to <bugs@gnutls.org>.

home page: https://www.gnutls.org

(be nice in the email, the maintainers are people too 🫢)


Copyright Β© 2001-2023 Free Software Foundation, Inc., and others.

copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. slay, and legally so. ✨


🌸 SEE ALSO 🌸

the full documentation for gnutls is maintained as a Texinfo manual. if the /usr/share/doc/gnutls/ directory does not contain the HTML form, visit:

https://www.gnutls.org/manual/


heads up bestie: this whole page lives in the gnutls manual, gnutls_pkcs11_get_raw_issuer_by_dn(3) section, and it's from gnutls 3.8.13. go forth, find those issuers, and remember β€” if she returns negative, that's not a vibe check you passed πŸ’…πŸ’–
πŸ“¦ where this page comes from