gnutls_x509_crt_get_pk_oid(3)

πŸ’… gnutls_x509_crt_get_pk_oid πŸ’…

okay bestie, welcome to the gnutls manual, section 3 (that's the library-functions section, iykyk). this page is all about gnutls_x509_crt_get_pk_oid, and yes it's a whole mouthful, but it's genuinely such a useful little function. let's get into it 🫢


✨ NAME ✨

gnutls_x509_crt_get_pk_oid β€” it's an API function, periodt.


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gnutls/x509.h>

int gnutls_x509_crt_get_pk_oid(gnutls_x509_crt_t cert, char * oid,
       size_t * oid_size);

like. look at her. so clean. πŸŽ€


🌸 ARGUMENTS 🌸

  • gnutls_x509_crt_t cert β€” this one should contain a gnutls_x509_crt_t type. that's the vibe. that's the assignment.
  • char * oid β€” a pointer to a buffer that's gonna hold the OID. and listen, bestie, it may be null β€” no pressure, she's flexible πŸ’…
  • size_t * oid_size β€” this one initially holds the size of oid. keyword: initially. she's the starting point, not the whole story.

πŸ‘‘ DESCRIPTION πŸ‘‘

so what does this queen actually do? she returns the OID of the public key algorithm on that certificate. that's it. that's the whole job. slay. ✨

and why would you ever need that, you ask? okay so here's the tea β€” this function is useful in the case gnutls_x509_crt_get_pk_algorithm() returned GNUTLS_PK_UNKNOWN. like, your algorithm lookup came back with nothing?? unknown?? a mystery?? don't panic β€” this is your backup plan, your girl in the group chat who always knows what's going on. she'll get you the OID when the other function left you on read. 😭


⭐ RETURNS ⭐

she returns zero on success, or a negative error code on error. so if you see a negative number, that's not a vibe, that's an error. check it. fr fr.


πŸŽ€ SINCE πŸŽ€

available since 3.5.0 β€” she's been around a minute, she's established, she's got main character energy πŸ’œ


πŸ› REPORTING BUGS πŸ›

found a bug? not me being the bearer of bad news but β€” report bugs to <bugs@gnutls.org>.

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


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

and the legal bit, which we respect: 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. iconic behaviour honestly.


πŸ’– 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/

go forth and read, bestie πŸ¦‹


that's the whole page!! mwah πŸ’‹ β€” this was gnutls_x509_crt_get_pk_oid(3) from gnutls 3.8.13, and yeah she's giving documentation, she's giving reference material, and honestly? she ate. stay hydrated, read your man pages, and remember: GNUTLS_PK_UNKNOWN is not the end of the world, it's just the beginning of this function's whole career ✨🫢

πŸ“¦ where this page comes from