gnutls_sign_set_secure_for_certs(3)

πŸ’– gnutls_sign_set_secure_for_certs β€” the manual page, but make it make sense πŸ’–

okay bestie, so this is one of the gnutls pages, and it's a very specific little function. like, niche-niche. but we're gonna slay it anyway. πŸŽ€


✨ NAME ✨

gnutls_sign_set_secure_for_certs β€” it's an API function, bestie. that's the whole name. πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/gnutls.h>

int gnutls_sign_set_secure_for_certs(gnutls_sign_algorithm_t sign,
unsigned int secure);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_sign_algorithm_t sign β€” the sign algorithm in question, the one we're talking about, the main character of this function πŸ’«
  • unsigned int secure β€” whether we're marking that sign algorithm as secure for certificates. yes or no, secure or not, that's the vibe check right there 🌈

πŸ‘‘ DESCRIPTION πŸ‘‘

okay so here's the tea. this function modifies the previous system-wide setting that marked sign as secure or insecure for use in certificates. like, you're going in and changing what was already decided. iconic behaviour, honestly. ✨

but β€” and this is the big but β€” calling this function is only allowed if allowlisting mode is set in the configuration file, AND only if the system-wide TLS priority string has not been initialized yet. so if you've already initialized that thing? nope. sorry bestie. πŸ™ˆ

the intended usage is to give applications a way to expressly deviate from the distribution or site defaults that they inherited from the configuration file. like, the distro said one thing, and your app is like "actually no, i'm built different." πŸ’… and the modification is composable with further modifications performed through the priority string mechanism β€” they stack, they layer, they coexist. no cap. 🫢

⚠️ IMPORTANT, FR FR: this function is not thread-safe. it is intended to be called in the main thread at the beginning of the process execution. do not be out here calling it from a random thread in the middle of everything, that's not the move. 😭

and now the part where you gotta read carefully, because the words are doing a lot:

  • when secure is true, sign is marked as secure for any use β€” unlike gnutls_sign_set_secure(). πŸ‘€
  • otherwise (when secure is not true), it is marked as insecure only for the use in certificates.

so if you want to mark it insecure for any uses, you need to use gnutls_sign_set_secure() instead. different function, different job. iykyk. 🧚


⭐ RETURNS ⭐

0 on success, or a negative error code otherwise. so basically: zero = we ate, negative = we did not eat. πŸ’€


πŸŽ€ SINCE πŸŽ€

3.7.3 β€” she's been around a minute, but she's still cute. 🌸


πŸ’œ REPORTING BUGS πŸ’œ

found a bug? report it, bestie, don't just sit on it:


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. so like, go off, just keep the receipts. 🫢


πŸ”₯ 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 whole page, bestie. you now know everything there is to know about gnutls_sign_set_secure_for_certs. go forth and configure responsibly. πŸ’–

this has been the gnutls manual, version 3.8.13 β€” mwah, bye, ily, go read the Texinfo manual if you want more. πŸ’…βœ¨

πŸ“¦ where this page comes from