gnutls_pkcs11_get_raw_issuer(3)

✨ gnutls_pkcs11_get_raw_issuer ✨

okay bestie, this is a page from the gnutls manual, and it's about the function gnutls_pkcs11_get_raw_issuer. it's giving "find my cert's mom" energy and honestly? obsessed. πŸ’…


🌸 NAME 🌸

gnutls_pkcs11_get_raw_issuer β€” it's an API function, babes. that's the whole name. no cap. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

so you gotta pull in the header first, like:

#include <gnutls/pkcs11.h>

and then the function itself, here's the literal signature, character for character, don't @ me:

int gnutls_pkcs11_get_raw_issuer(const char * url, gnutls_x509_crt_t
cert, gnutls_datum_t * issuer, gnutls_x509_crt_fmt_t fmt, unsigned int
flags);

πŸŽ€ ARGUMENTS πŸŽ€

  • const char * url β€” a PKCS 11 url that identifies a token. it's the little address of where your stuff lives πŸ’–
  • gnutls_x509_crt_t cert β€” the certificate you're trying to find an issuer for. the main character, fr.
  • gnutls_datum_t * issuer β€” this one will hold the issuer if there is any, and it comes in an allocated buffer. so yes, memory is being handed to you, be normal about it 🫢
  • gnutls_x509_crt_fmt_t fmt β€” the format of the exported issuer. you pick the vibe. ✨
  • unsigned int flags β€” use zero, or flags from GNUTLS_PKCS11_OBJ_FLAG. that's the whole menu 🌈

πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the tea: this function will return the issuer of a given certificate, if it is stored in the token. that "if" is doing a LOT of work, so pay attention.

by default, only issuers that are marked as trusted get returned. lowkey picky, but valid.

but if you want any issuer at all to come back, you gotta specify GNUTLS_PKCS11_OBJ_FLAG_RETRIEVE_ANY in flags. that's the switch, bestie. flip it and she'll hand over whatever she's got. πŸ”₯


⭐ RETURNS ⭐

on success, GNUTLS_E_SUCCESS (0) is returned. yay, zero, iconic. ✨

otherwise you get a negative error value, which is the C way of saying "we need to talk". 😭


🧚 SINCE 🧚

3.2.7 β€” she's been around a minute, an elder actually. πŸ’œ


πŸ’€ REPORTING BUGS πŸ’€

found a bug? don't suffer in silence, tell the people:


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. (translation: go off, just keep the receipts 🧾)


🌈 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/

reminder bestie: the issuer argument hands you an allocated buffer, so don't just walk away from it. that's not the move. πŸ™ˆ

sign-off time πŸŽ€ this lil masterpiece comes to you from gnutls version 3.8.13, and yeah, the manual's name is just... gnutls. mwah. stay slay, read your man pages, hydrate. πŸ’–βœ¨πŸ¦‹πŸŒΈπŸ’…πŸ«ΆπŸ‘‘

πŸ“¦ where this page comes from