gnutls_fips140_push_context(3)

✨ NAME ✨

gnutls_fips140_push_context β€” literally the API function that swaps your FIPS context onto the current thread πŸ’… (it's in the gnutls manual, bestie)


πŸŽ€ SYNOPSIS πŸŽ€

#include <gnutls/gnutls.h>

int gnutls_fips140_push_context(gnutls_fips140_context_t context);

🌸 ARGUMENTS 🌸

  • gnutls_fips140_context_t context β€” a gnutls_fips140_context_t. yes that's the whole description, she's a mystery but she's iconic πŸ¦‹

πŸ’– DESCRIPTION πŸ’–

okay so what this does: it associates the FIPS context to the current thread, which means it diverts whatever context was already active. main character energy, sorry to the old context πŸ™ˆ

⚠️ real talk though β€” if a cryptographic operation is ongoing in the current thread, like gnutls_aead_cipher_init() got called but gnutls_aead_cipher_deinit() hasn't happened yet, this function returns an error: GNUTLS_E_INVALID_REQUEST. do not pass go, do not collect $200 πŸ’€

The operation state of context will be reset to GNUTLS_FIPS140_OP_INITIAL. fresh start, clean slate, new era ✨

And listen: this function is a no-op if FIPS140 is not compiled in nor enabled at run-time. like it just. doesn't do anything. vibes only 🧚


⭐ RETURNS ⭐

0 upon success, a negative error code otherwise. slay when it's zero, sad girl hours when it's negative 😭


🌈 SINCE 🌈

3.7.3 β€” she's been here a minute, respect the elders πŸ‘‘


🫢 REPORTING BUGS 🫢

Found a bug? spill it to <bugs@gnutls.org>. they wanna hear it fr fr.

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. (yes bestie, you can copy it, the FSF said so, we love a permissive queen πŸŽ€)


πŸ”₯ 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/

go read it, iykyk πŸ“š


that's the whole page, no cap. this was gnutls 3.8.13, gnutls_fips140_push_context(3), and the manpage date lines up with that version too β€” thanks for reading bestie, now go push that context πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from