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 yourgnutls_psk_client_credentials_ttype. 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 eitherGNUTLS_PSK_KEY_RAWorGNUTLS_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:
- 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.
(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
- 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