GNUTLS_PKCS11_PRIVKEY_GET_PK_ALGORITHM(3)

πŸ’– NAME πŸ’–

gnutls_pkcs11_privkey_get_pk_algorithm β€” okay bestie, this is an API function from the gnutls manual, and it's the one that tells you what public key algorithm your private key is serving πŸ’…


✨ SYNOPSIS ✨

#include <gnutls/pkcs11.h>

int gnutls_pkcs11_privkey_get_pk_algorithm(gnutls_pkcs11_privkey_t key,
                                           unsigned int * bits);

Like, that's the whole vibe. One call, two args, no drama πŸŽ€


🌸 ARGUMENTS 🌸

  • gnutls_pkcs11_privkey_t key β€” this one "should contain a gnutls_pkcs11_privkey_t type". It's the private key you're interrogating, bestie, be nice to it 🫢
  • unsigned int * bits β€” if bits is non null, it's gonna hold the size of the parameters' in bits. So like, the bit-size of the params, she's measuring πŸ”₯

πŸ¦‹ DESCRIPTION πŸ¦‹

So the way this works: this function will return the public key algorithm of a private key. That's it. That's the whole job. It looks at your private key and goes "oh okay, I know what you are" πŸ‘‘


⭐ RETURNS ⭐

On success you get a member of the gnutls_pk_algorithm_t enumeration. Slay. ✨

But if something's off, you get a negative error code instead β€” no cap, check for that, don't just assume it worked πŸ’€


😭 REPORTING BUGS 😭

Found a bug? Not me getting an error code fr fr. Report bugs 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. Iconic behaviour honestly, that's the licensing main character energy 🌈


🧚 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/

And that's a wrap, bestie πŸ“ this page is from gnutls 3.8.13 β€” the gnutls_pkcs11_p...et_pk_algorithm(3) manual page, iykyk πŸ’œ go read your keys' algorithms, you're doing amazing sweetie πŸ’…βœ¨

πŸ“¦ where this page comes from