gnutls_oid_to_pk(3)

✨ gnutls_oid_to_pk(3) ✨

okay bestie, welcome to the gnutls section 3 manual, and today's main character is gnutls_oid_to_pk. it's a lil API function, it's lowkey iconic, and it does exactly one thing. let's get into it πŸ’…


🌸 NAME 🌸

gnutls_oid_to_pk β€” it's an API function, no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gnutls/gnutls.h>

gnutls_pk_algorithm_t gnutls_oid_to_pk(const char * oid);

that's it. that's the whole vibe. one include, one function, one argument. clean. ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • const char * oid β€” bestie this is an object identifier, and yes it's a string, hence the const char *. that's the tea. πŸ“

πŸ’– DESCRIPTION πŸ’–

so what does it DO? it takes a textual object identifier and converts it into a gnutls_pk_algorithm_t value. that's the whole plot. textual OID goes in, public-key algorithm value comes out. it's giving translator, it's giving glow-up for a string. πŸ‘‘


πŸ‘‘ RETURNS πŸ‘‘

on success you get a gnutls_pk_algorithm_t id of the specified digest algorithm. and if things go sideways? you get GNUTLS_PK_UNKNOWN on failure. so like, check for that. don't just assume it ate. πŸ’€

ngl the return type says pk algorithm but the doc says "id of the specified digest algorithm" β€” that's literally what it says, so i'm passing it to you word for word. iykyk. πŸ™ˆ

⭐ SINCE ⭐

3.4.3 β€” so this has been around for a minute, it's a seasoned queen. 🫢


🌈 REPORTING BUGS 🌈

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

home page is right here: 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 like, take it, share it, remix it, just keep the receipts. periodt. πŸ’…)


🧚 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_oid_to_pk(3) from the gnutls 3.8.13 era, and honestly? she ate. go convert some OIDs. mwah. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from