gnutls_fips140_set_mode(3)
π gnutls_fips140_set_mode(3) β the gnutls girlies' manual
okay bestie, welcome to the gnutls manual, and today's main character is gnutls_fips140_set_mode. yes it's an API function. yes it's gonna be cute. let's go π«Ά
β¨ NAME β¨
gnutls_fips140_set_mode β API function. that's it, that's the name, she's literally just that πβοΈ
πΈ SYNOPSIS πΈ
#include <gnutls/gnutls.h>
void gnutls_fips140_set_mode(gnutls_fips_mode_t mode, unsigned flags);
look at her. returns nothing, takes two things. no notes. β¨
π ARGUMENTS π
gnutls_fips_mode_t modeβ the FIPS140-2 mode you wanna switch to, bestie. pick one.unsigned flagsβ this one should be zero orGNUTLS_FIPS140_SET_MODE_THREAD. that's the whole vibe. don't get creative with it π
π DESCRIPTION π
okay so, listen up, this is the important part, don't skip it π¨
That function is not thread-safe when you're changing the mode with no flags (i.e. globally), and it should be called prior to creating any threads. Its behavior with no flags after threads are created is undefined. like, undefined undefined. we don't do that here. periodt. π
When the flag GNUTLS_FIPS140_SET_MODE_THREAD is specified, then this call will change the FIPS140-2 mode for this particular thread and not for the whole process. that's the slay. that way an application can utilize this function to set and reset mode for specific operations. cute, contained, no chaos leaking into other threads. we love a scoped queen π
This function never fails β iconic, no error handling needed, no sad return values β but it will be a no-op if you use it when the library is not in FIPS140-2 mode. like, she'll just smile and do nothing. respectfully.
When asked to switch to unknown values for mode, or to GNUTLS_FIPS140_SELFTESTS mode, the library switches to GNUTLS_FIPS140_STRICT mode. so like, if you ask for something weird, she's giving you STRICT. no negotiations. π
β SINCE β
3.6.2 β she's been here a minute, an OG fr fr π
π¦ REPORTING BUGS π¦
found a bug? not me manifesting that but okay. report bugs to <bugs@gnutls.org>.
Home page: https://www.gnutls.org β go say hi π
π 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. (yes bestie, keep the receipts, that's the whole deal π«Ά)
π₯ 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 page, bestie!! π this was the gnutls 3.8.13 manual page for gnutls_fips140_set_mode, and it ate. go forth, set your modes responsibly, and pls pls pls call it before you spawn any threads, i'm begging ππ
π¦ 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