gnutls_sign_get_pk_algorithm(3)

✨ gnutls_sign_get_pk_algorithm ✨

okay bestie, gather round πŸ’– this one lives in the gnutls manual (yes, that gnutls, the TLS library, we stan) and it's literally just a little matchmaker function. It's an API function, it's cute, it's useful, let's get into it.


🌸 SYNOPSIS 🌸

#include <gnutls/gnutls.h>

gnutls_pk_algorithm_t
gnutls_sign_get_pk_algorithm(gnutls_sign_algorithm_t sign);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_sign_algorithm_t sign β€” bestie this is a signature algorithm. that's it. that's the whole input. she takes one (1) signature algorithm and she's ready to go πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

So what does she actually do? She hands you back the public key algorithm that corresponds to the signature algorithm you gave her. Signature in, public key algorithm out. matchmaker behaviour, honestly πŸ‘‘

but wait β€” plot twist 🫒 there can be multiple public key algorithms supporting a particular signature type. So like, it's not always a one-to-one situation. When you're dealing with those messy overlapping cases, don't use this one β€” use gnutls_sign_supports_pk_algorithm() instead. iykyk πŸ’€

fr fr, if your signature type could map to more than one public key algorithm, this function is not your girl. reach for gnutls_sign_supports_pk_algorithm() and thank me later 🫢

⭐ SINCE ⭐

Available since version 3.1.1. she's been around, she's got seniority, respect the elder 🧚


🌈 RETURNS 🌈

She returns a gnutls_pk_algorithm_t value. Iconic. ✨

But if something goes wrong? You get GNUTLS_PK_UNKNOWN on error. so like, check for that, bestie, don't just vibe-check the return value and move on 😭


πŸ’œ REPORTING BUGS πŸ’œ

Found a bug? Not the vibe, but okay, report it:


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 queen, share it, remix 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, go visit:

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

like, click the link, it's free, it's giving main character energy 🌸


and that's the whole page, bestie πŸ’– written for gnutls manual, version 3.8.13, page gnutls_sign_get_pk_algorithm(3) β€” no cap, go forth and map your signature algorithms responsibly βœ¨πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from