gnutls_session_set_premaster(3)
β¨ gnutls_session_set_premaster β the manual page bestie π
okay so this is a page from the gnutls manual, and honestly? it's giving "backstage pass to the TLS machine room." let's get into it π
πΈ NAME πΈ
gnutls_session_set_premaster β it's an API function, bestie. that's the whole name. iconic, brief, no notes. β¨
π¦ SYNOPSIS π¦
#include <gnutls/gnutls.h>
int gnutls_session_set_premaster(gnutls_session_t session, unsigned int
entity, gnutls_protocol_t version, gnutls_kx_algorithm_t kx,
gnutls_cipher_algorithm_t cipher, gnutls_mac_algorithm_t mac,
gnutls_compression_method_t comp, const gnutls_datum_t * master, const
gnutls_datum_t * session_id);
look at all those parameters. nine of them. she's high maintenance and she knows it π
π ARGUMENTS π
gnutls_session_t sessionβ it's agnutls_session_ttype. yeah. that's the description. the session you're doing this whole thing to.unsigned int entityβ eitherGNUTLS_SERVERorGNUTLS_CLIENT. pick your side of the conversation, bestie.gnutls_protocol_t versionβ the TLS protocol version. the era of the vibe.gnutls_kx_algorithm_t kxβ the key exchange method. how the secrets get traded.gnutls_cipher_algorithm_t cipherβ the cipher. the actual scrambling.gnutls_mac_algorithm_t macβ the MAC algorithm. integrity check queen πgnutls_compression_method_t compβ the compression method, and listen: it is ignored. it's there for the aesthetic. we don't use it. it's decorative πconst gnutls_datum_t * masterβ the master key to use. the whole point of this function, lowkey.const gnutls_datum_t * session_idβ the session identifier. the little name tag your session wears.
π₯ DESCRIPTION π₯
okay so what this function does: it sets the premaster secret in a session. that's it. that's the job.
but here's the thing, and I need you to hear me on this one:
this is a function intended for exceptional uses. do NOT use this function unless you are implementing a legacy protocol. fr fr. I'm not playing.
if you're not out here building a legacy protocol, use gnutls_session_set_data() instead. she's the normal, well-adjusted option. go talk to her. π«Ά
β RETURNS β
on success, GNUTLS_E_SUCCESS (0) is returned. otherwise? you get an error code back, and it's giving "read the error, bestie." π
π REPORTING BUGS π
found a bug? report it to <bugs@gnutls.org>. they wanna know. no cap.
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, that's a very chill license π
π 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!! this one came from the gnutls manual, version 3.8.13, and it's the gnutls_session_set_premaster(3) page. go forth, implement your legacy protocol responsibly, and remember: don't touch the premaster unless you truly have to. mwah πβ¨
π¦ 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