gnutls_psk_all...er_credentials2(3)

πŸ“¦
version 3.8.13 Β· 3 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, fedora 43, fedora 44, ubuntu stonking

✨ NAME ✨

gnutls_psk_allocate_server_credentials2 β€” it's an API function, bestie πŸ’… (and yes, this page lives in the gnutls manual, section 3, so if you see gnutls_psk_all...er_credentials2(3) floating around, that's just her government name, it got truncated, she's fine)


🌸 SYNOPSIS 🌸

#include <gnutls/gnutls.h>

int
gnutls_psk_allocate_server_credentials2(gnutls_psk_server_credentials_t
* sc, gnutls_mac_algorithm_t mac);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_psk_server_credentials_t * sc β€” okay so this is a pointer to a gnutls_psk_server_credentials_t type. It's the lil container she's gonna fill up for you 🫢
  • gnutls_mac_algorithm_t mac β€” the encryption algorithm to use, no cap

πŸ’– DESCRIPTION πŸ’–

So what she does is: she allocates a gnutls_psk_server_credentials_t structure, and she initializes the HMAC binder algorithm to mac. That's the whole vibe. Iconic, honestly.

And here's the lil plot twist β€” if mac is set to GNUTLS_MAC_UNKNOWN, then both of the possible algorithms, SHA384 and SHA256, get applied to find a matching binder value. Not one, not the other, both. She's doing the most and we love that for her ✨


⭐ RETURNS ⭐

On success, GNUTLS_E_SUCCESS (0) is returned πŸŽ‰ otherwise an error code is returned. So like, check it, okay? Don't just vibe past the return value, bestie 😭


πŸ¦‹ REPORTING BUGS πŸ¦‹

Found a bug? 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.

(Translation: yes you can share 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/

and that's the whole page, periodt πŸ’…βœ¨ β€” this was the gnutls manual, version 3.8.13, page gnutls_psk_all...er_credentials2(3). go forth and allocate those credentials, main character 🫢🌸

πŸ“¦ where this page comes from