GNUTLS_PSK_SET_CLIENT_CREDENTIALS2(3)

πŸ’– NAME πŸ’–

gnutls_psk_set_client_credentials2 β€” it's an API function, bestie, and it's here to set your PSK client credentials, just with a lil glow-up ✨


🌸 SYNOPSIS 🌸

#include <gnutls/gnutls.h>

int gnutls_psk_set_client_credentials2(gnutls_psk_client_credentials_t
res, const gnutls_datum_t * username, const gnutls_datum_t * key,
gnutls_psk_key_flags flags);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_psk_client_credentials_t res β€” okay so this is your gnutls_psk_client_credentials_t type. it's the thing you're filling in, the main character of the function fr πŸ’…
  • const gnutls_datum_t * username β€” the userid. that's it, that's the vibe 🫢
  • const gnutls_datum_t * key β€” the user's key πŸ”‘
  • gnutls_psk_key_flags flags β€” tells everyone what format your key is in, and it's gotta be either GNUTLS_PSK_KEY_RAW or GNUTLS_PSK_KEY_HEX. those are the only two options, no cap 🌈

πŸ¦‹ DESCRIPTION πŸ¦‹

So this function is literally identical to gnutls_psk_set_client_credentials(), like twins πŸ‘― except for ONE iconic difference: it lets you pass in a username that is not null-terminated. that's the whole plot twist, that's the moment ✨


⭐ RETURNS ⭐

If it works? You get GNUTLS_E_SUCCESS (that's 0, the beautiful zero πŸŽ€) back. If it doesn't work, you get an error code instead. no in-between, she's dramatic like that 😭


πŸ™ˆ REPORTING BUGS πŸ™ˆ

Found a bug? Spill the tea, don't be shy:


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.

(periodt. the lawyers said what they said πŸ’œ)


πŸ’€ 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/

iykyk 🧚


okay that's the whole page bestie, you ate it πŸ’… this was gnutls 3.8.13, from the gnutls manual β€” go forth and set those credentials, you absolute icon πŸŒŸπŸ“

πŸ“¦ where this page comes from