gnutls_x509_ext_import_proxy(3)

πŸ’– gnutls_x509_ext_import_proxy β€” bestie edition πŸ’–

okay so this is a page from the gnutls manual, and it's literally all about pulling the deets out of a proxy certificate extension. no cap, it's a whole vibe. let's get into it πŸ¦‹


✨ NAME ✨

gnutls_x509_ext_import_proxy β€” the API function that yoinks info out of a proxy cert extension πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <gnutls/x509-ext.h>

int gnutls_x509_ext_import_proxy(const gnutls_datum_t * ext, int *
pathlen, char ** policyLanguage, char ** policy, size_t *
sizeof_policy);

🌸 ARGUMENTS 🌸

  • const gnutls_datum_t * ext β€” bestie this is the DER encoded extension data, the raw material, the main character of the input 🫢
  • int * pathlen β€” pointer to an output integer that tells you the path length. it may be NULL, so it's giving optional. here's the tea: non-negative error codes mean there's a present pCPathLenConstraint field and that's the actual value, and -1 means the field is literally absent, she's not there 😭
  • char ** policyLanguage β€” output variable holding the OID of the policy language ✨
  • char ** policy β€” output variable holding the policy data itself πŸ‘‘
  • size_t * sizeof_policy β€” output variable with the size of the policy data, because we need to know how much policy we're dealing with πŸ“

πŸ’– DESCRIPTION πŸ’–

so this function returns the information from a proxy certificate extension. it reads the ProxyCertInfo X.509 extension, which is 1.3.6.1.5.5.7.1.14 β€” yes, that exact OID, copy it carefully bestie, character for character, iykyk πŸ”₯

⚠️ IMPORTANT: the policyLanguage and policy values must be deinitialized using gnutls_free() after use. don't leave them hanging, that's rude and also a memory leak πŸ’€

⭐ RETURNS ⭐

on success, GNUTLS_E_SUCCESS (0) is returned. otherwise you get a negative error value. that's it, that's the whole vibe check 🌈


πŸ¦‹ SINCE πŸ¦‹

3.3.0 β€” she's been iconic since 3.3.0, a true veteran πŸ’œ


πŸ™ˆ REPORTING BUGS πŸ™ˆ

found a bug? spill it to <bugs@gnutls.org> πŸ“

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


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 yes, you can share it, just keep the receipts bestie ✨


πŸ‘‘ 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, then like, go visit:

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

and that's the whole page, bestie!! πŸ’–βœ¨πŸŽ€ this was gnutls_x509_ext_import_proxy(3) from the gnutls manual, version 3.8.13 β€” slay, periodt, go read the extension πŸ’…πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from