gnutls_x509_crt_get_proxy(3)

πŸ’– gnutls_x509_crt_get_proxy πŸ’–

okay bestie, so you found yourself in the gnutls manual (yes, that gnutls, the 3.8.13 era, iconic) and you're staring at gnutls_x509_crt_get_proxy(3). don't panic. it's giving "niche but powerful" and honestly? we're obsessed. let's get into it 🫢


✨ NAME ✨

gnutls_x509_crt_get_proxy β€” it's an API function, periodt. that's the whole name. she's simple like that πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/x509.h>

int gnutls_x509_crt_get_proxy(gnutls_x509_crt_t cert, unsigned int *
critical, int * pathlen, char ** policyLanguage, char ** policy, size_t *
sizeof_policy);

yes, that's six arguments. she's a lot. but so are we πŸ’€


πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_x509_crt_t cert β€” bestie, this one should contain a gnutls_x509_crt_t type. that's the vibe check. it's the certificate you're snooping on πŸ‘‘
  • unsigned int * critical β€” this lil output will be non-zero if the extension is marked as critical. so like, if it's that important, she'll let you know ✨
  • int * pathlen β€” a pointer to an output integer indicating path length. and yes, it may be NULL, no pressure. here's the tea: non-negative error codes mean there's a present pCPathLenConstraint field, and they give you the actual value. but -1? -1 means the field is absent. she ghosted you πŸ₯²
  • char ** policyLanguage β€” output variable holding the OID of the policy language 🌈
  • char ** policy β€” output variable with the policy data, the actual content, the main character of the output πŸŽ€
  • size_t * sizeof_policy β€” output variable for the size of that policy data. gotta know how much you're working with, iykyk πŸ“

πŸ¦‹ DESCRIPTION πŸ¦‹

so what does this function actually do? she will get information from a proxy certificate. like, that's her whole job and she does it well 🫢

specifically, she reads the ProxyCertInfo X.509 extension β€” the one and only 1.3.6.1.5.5.7.1.14. yes that's a real OID, no cap. write it down, screenshot it, tattoo it, whatever you gotta do πŸ’–


⭐ RETURNS ⭐

on success? GNUTLS_E_SUCCESS (0) is returned, and we celebrate πŸŽ‰ otherwise you get a negative error code back. it's giving "not today, bestie" 😭


😀 REPORTING BUGS 😀

found a bug? do NOT suffer in silence, take it straight to the source:

they wanna hear from you fr fr πŸ™ˆ


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. so like, go forth and 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, bestie, you gotta go visit:

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

it's right there waiting for you πŸ’œ


lowkey reminder: this page is from the gnutls manual, version 3.8.13. stay hydrated, read your man pages, and slay πŸŒˆβœ¨πŸ’…
πŸ“¦ where this page comes from