gnutls_dh_params_export_raw(3)
β¨ gnutls_dh_params_export_raw β¨
okay bestie, welcome to the gnutls manual β this one's a lil function page, and it's lowkey iconic. no cap. π
π NAME π
gnutls_dh_params_export_raw β API function
so like. it's an API function. that's the name. slay.
πΈ SYNOPSIS πΈ
#include <gnutls/gnutls.h>
int gnutls_dh_params_export_raw(gnutls_dh_params_t params,
gnutls_datum_t * prime, gnutls_datum_t * generator, unsigned int *
bits);
yes she's a whole signature. look at her. β¨
π ARGUMENTS π
gnutls_dh_params_t paramsβ this one's holding the DH parameters. she's the source of truth, the main character, the keeper of the vibes. πgnutls_datum_t * primeβ will hold the new prime. that's the assignment. she comes out of this function holding it. π«Άgnutls_datum_t * generatorβ will hold the new generator. same deal, she gets the generator, no stress.unsigned int * bitsβ if non null will hold the secret key's number of bits. note the if non null β that's a real condition, bestie, so if you passNULLshe's just not gonna fill it in, and that's fine and legal. π
π¦ DESCRIPTION π¦
okay so. this function will export the pair of prime and generator for use in the Diffie-Hellman key exchange. it's giving "here's the two numbers you need, go do your little key exchange, mwah." π
and listen β the new parameters will be allocated using gnutls_malloc() and will be stored in the appropriate datum. so that memory? not yours to just casually free(), bestie. that's the whole point. read the docs, live the docs. π
β RETURNS β
on success, GNUTLS_E_SUCCESS (0) is returned. otherwise a negative error code is returned. so like, zero is the good one here, which is a fun little twist because usually zero is giving nothing. not here. here zero is everything. π
π REPORTING BUGS π
found a bug? not the vibe, but okay, report bugs to <bugs@gnutls.org>.
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. (so yes you may, just keep the receipts. that's the rule. π«Ά)
π 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 forth and read. iykyk. πΈ
and that's the page, babe β this was gnutls 3.8.13, the gnutls_dh_params_export_raw(3) manual, brought to you by the gnutls peeps. ty for coming to my ted talk, ily, go export some DH params responsibly. β¨ππ
π¦ 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