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 agnutls_pkcs11_privkey_ttype". It's the private key you're interrogating, bestie, be nice to it π«Άunsigned int * bitsβ ifbitsis 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 π
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
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms