gnutls_fips140_run_self_tests(3)

πŸ’– gnutls_fips140_run_self_tests πŸ’–

okay bestie so this one lives in the gnutls manual, and it's lowkey one of the most serious little functions in the whole library. it's giving ✨ "I check my own homework" ✨ energy, except the homework is cryptography and failing it is not a vibe.


✨ NAME ✨

gnutls_fips140_run_self_tests β€” an API function, no cap πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/gnutls.h>

int gnutls_fips140_run_self_tests( void);

πŸŽ€ ARGUMENTS πŸŽ€

  • void β€” that's it, bestie. nothing goes in. no params, no drama, she takes no input, she simply runs. πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, this function manually performs the second round of the FIPS140 self-tests. manually! as in you have to call it, she's not gonna do it unprompted. πŸ™ˆ

and what does that round include, you ask? glad you asked:

  • Known answer tests (KAT) for the selected set of symmetric cipher, MAC, public key, KDF, and DRBG πŸ”₯
  • Library integrity checks ⭐
okay now the serious part, bestie, listen up: upon failure with FIPS140 mode enabled, it makes the library unusable. like, unusable unusable. that's not a soft fail, that's a "we're done here" situation. πŸ’€
also: this function is not thread-safe. so do NOT go calling it from a bunch of threads at once thinking you're being efficient. you're not. you're being chaotic. 🫢

πŸ‘‘ RETURNS πŸ‘‘

  • 0 upon success πŸŽ‰
  • a negative error code otherwise 😭

🌈 SINCE 🌈

3.7.7 β€” she's been around since 3.7.7, an icon, a legend, a moment. πŸ‘‘


πŸ› REPORTING BUGS πŸ›

found a bug? don't be shy, report it, that's the whole point of community:


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.

(translation: free to share, free to remix, just keep the receipts. slay. πŸ’…)


🧚 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, the Texinfo manual is where all the lore lives. go read it. πŸ“šβœ¨


and that's the whole page, bestie!! 🫢 this was the gnutls manual, version 3.8.13, and yeah the page itself is dated with that same 3.8.13 and titled gnutls_fips140_run_self_tests(3) β€” now go call that function responsibly and stay thread-safe out there πŸ’–πŸŒΈπŸŽ€

πŸ“¦ where this page comes from