gnutls_pcert_import_x509_raw(3)

✨ gnutls_pcert_import_x509_raw(3) ✨

okay bestie, so this one lives in the gnutls manual and it's literally called gnutls_pcert_import_x509_raw β€” like, the name says it all, we're importing a raw x509 cert into a pcert. sit down, hydrate, let's go 🫢


🌸 NAME 🌸

gnutls_pcert_import_x509_raw β€” it's an API function, bestie. that's the whole name. short, sweet, iconic πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

#include <gnutls/abstract.h>

int gnutls_pcert_import_x509_raw(gnutls_pcert_st * pcert, const
gnutls_datum_t * cert, gnutls_x509_crt_fmt_t format, unsigned int
flags);

there she is. four args, one int return, zero drama πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_pcert_st * pcert β€” the pcert structure, aka the lil container where your cert is gonna live. this is the destination, the main character of the operation ✨
  • const gnutls_datum_t * cert β€” the raw certificate that's getting imported. raw, unfiltered, no cap πŸ“
  • gnutls_x509_crt_fmt_t format β€” the format of the certificate. gotta tell it what kind of cert you're handing over, it can't just guess 😭
  • unsigned int flags β€” zero for now. that's it. zero. for now. (iykyk, future-proofing behavior πŸ’€)

πŸ’– DESCRIPTION πŸ’–

so this is a convenience function β€” meaning it's here to make your life easier, you're welcome β€” and what it does is import the given certificate straight into a gnutls_pcert_st structure.

⚠️ okay important part, do NOT skip this: the structure must be deinitialized afterwards using gnutls_pcert_deinit(); β€” like, you have to clean up after yourself, bestie. no leaving your cert structure just sitting there with no deinit. that's not the vibe πŸ™ˆ

🌈 RETURNS 🌈

on success, GNUTLS_E_SUCCESS (0) comes back at you like a little reward sticker ⭐ β€” otherwise you get a negative error value, which is the code's way of saying "girl, something went wrong" πŸ’€


🧚 SINCE 🧚

3.0 β€” she's been around, she's a legacy icon, respect her πŸ‘‘


πŸŽ€ 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. slay, honestly β€” free to share, 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, go visit:

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

and that's the whole page, bestie πŸ’– this was gnutls 3.8.13 dropping gnutls_pcert_import_x509_raw(3) into your terminal β€” go forth, import those certs, and don't forget the gnutls_pcert_deinit(); or I will know 😀✨

πŸ“¦ where this page comes from