GNUTLS_PRIORITY_GET_CIPHER_SUITE_INDEX(3)

✨ gnutls_priority_get_cipher_suite_index ✨

okay bestie, this one lives in the gnutls manual (yes, the whole gnutls manual, she's famous) and she's an API function πŸ’…


🌸 NAME 🌸

gnutls_priority_get_cipher_suite_index β€” it's an API function, periodt.


πŸŽ€ SYNOPSIS πŸŽ€

#include <gnutls/gnutls.h>

int gnutls_priority_get_cipher_suite_index(gnutls_priority_t pcache,
unsigned int idx, unsigned int * sidx);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_priority_t pcache β€” is a gnutls_priority_t type. that's it, that's the vibe πŸ’–
  • unsigned int idx β€” is an index number. just a lil number, doing her thing.
  • unsigned int * sidx β€” the internal index of the cipher suite you wanna get info about πŸ‘‘

✨ DESCRIPTION ✨

so the way this works is: she hands you the internal ciphersuite index so you can go use it with gnutls_cipher_suite_info(). that's the whole point, no cap.

the idx you pass in? that's an index that's kept inside the priorities structure. and here's the tea β€” it might be that a valid priorities index does not actually correspond to a ciphersuite 😭 and in that case, GNUTLS_E_UNKNOWN_CIPHER_SUITE gets returned. rude, but valid.

and once you cross the last available index? yeah, GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE comes back. she said no more data for you πŸ™ˆ


πŸ’œ RETURNS πŸ’œ

on success she returns GNUTLS_E_SUCCESS (0) πŸ₯³ β€” or a negative error value otherwise. so like, check that return value bestie, fr fr.


🌈 SINCE 🌈

3.0.9 β€” an icon, a legend, been around forever, we stan ⭐


🫢 REPORTING BUGS 🫢

found a bug? spill 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 you can share her around, 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/

okay that's the whole page bestie, you ate it up πŸ’…πŸŒΈ

this was gnutls version 3.8.13, signing off β€” mwah, love u, go read ur cipher suites πŸŽ€πŸ’–
πŸ“¦ where this page comes from