GNUTLS_SRP_SET_CLIENT_CREDENTIALS(3)
π gnutls_srp_set_client_credentials β it's giving "log me in, bestie" β¨
okay so this is a page from the gnutls manual (yes, that gnutls, the TLS library, she's iconic) and today we're talking about one very specific little function that sets up your SRP client creds. strap in π
πΈ NAME πΈ
gnutls_srp_set_client_credentials β literally just an API function, that's it, that's the whole name π
π¦ SYNOPSIS π¦
#include <gnutls/gnutls.h>
int gnutls_srp_set_client_credentials(gnutls_srp_client_credentials_t
res, const char * username, const char * password);
not me noticing the line break in the middle of the parameter list β that's just how the manpage wraps it, keep it exactly like that, no cap π
π ARGUMENTS π
gnutls_srp_client_credentials_t resβ this is agnutls_srp_client_credentials_ttype. yes bestie, the type is named in the description of the type, we love a self-referential moment πconst char * usernameβ it's the user's userid πconst char * passwordβ it's the user's password π (do NOT leak it, periodt)
π DESCRIPTION π
so this function sets the username and password, inside a gnutls_srp_client_credentials_t type. those two things are gonna be used in SRP authentication, so like, they matter fr fr β¨
about username: it should be an ASCII string or a UTF-8 string. and if it is a UTF-8 string, it's recommended to follow the PRECIS framework for usernames (that's rfc8265, go read it, it's giving "standards girlie" π).
about the password: it can be in ASCII format, or normalized using gnutls_utf8_password_normalize(). pick your fighter π
β RETURNS β
on success you get GNUTLS_E_SUCCESS (which is 0) returned to you, like a little gift π β or, alternatively, an error code. that's it. that's the whole return story.
π REPORTING BUGS π
found a bug? don't suffer in silence, tell the people:
- 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. slay, honestly π«Ά
π 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/
ok final vibe check: don't guess at behaviour, don't invent options, just set your username and password and let SRP do its thing π
and that's the whole page bestie, brought to you by gnutls 3.8.13 β mwah, catch you on the next manpage π§β¨π
π¦ 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