gnutls_x509_pr...t_pk_algorithm2(3)

πŸ’– gnutls_x509_privkey_get_pk_algorithm2(3) πŸ’–

okay bestie, sit down, hydrate, and let me tell you about this lil guy from the gnutls manual πŸ’… it lives in section 3, it's an API function, and it's literally the moment where you ask a private key "hey babe, what public key algorithm are you?" πŸ¦‹


✨ NAME ✨

gnutls_x509_privkey_get_pk_algorithm2 β€” API function πŸ‘‘


🌸 SYNOPSIS 🌸

#include <gnutls/x509.h>

int gnutls_x509_privkey_get_pk_algorithm2(gnutls_x509_privkey_t key,
unsigned int * bits);

no cap, that's the whole flex. two args, one int coming back at you πŸŽ€


🫢 ARGUMENTS 🫢

  • gnutls_x509_privkey_t key β€” bestie this one should contain a gnutls_x509_privkey_t type. that's the whole job description, it's giving "be the private key, please" πŸ’œ
  • unsigned int * bits β€” this is where the number of bits in the public key algorithm gets dropped off. it's a pointer, so it's writing back to you, main character energy fr fr ✨

πŸ’« DESCRIPTION πŸ’«

This function will return the public key algorithm of a private key. that's it. that's the tea β˜• it looks at your key and goes "oh, I know her" and hands you back the algorithm. iconic behaviour, honestly 🌈


πŸ”₯ RETURNS πŸ”₯

on success you get a member of the gnutls_pk_algorithm_t enumeration β€” slay πŸ’…

on error you get a negative error code β€” not slay 😭 so like, check for that, okay? don't be out here assuming everything's fine.


πŸ› REPORTING BUGS πŸ›

found a bug? don't gatekeep, report 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. (yes bestie, that means you can copy it, 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, visit:

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

like, go read the whole thing, it's a vibe, iykyk πŸ“šπŸ’–


and that's the whole page, bestie!! this was gnutls 3.8.13, written up in the gnutls_x509_privkey_get_pk_algorithm2(3) manual page β€” go forth and get those pk algorithms, you absolute legend πŸŽ€πŸ’œβœ¨

πŸ“¦ where this page comes from