gnutls_dh_params_import_raw2(3)

πŸ’– gnutls_dh_params_import_raw2(3) πŸ’–

okay bestie, sit down, hydrate, and let me tell you about a lil function from the gnutls manual πŸ’… this one's called gnutls_dh_params_import_raw2 and it's genuinely so useful, no cap.


✨ NAME ✨

gnutls_dh_params_import_raw2 β€” API function πŸŽ€


🌸 SYNOPSIS 🌸

#include <gnutls/gnutls.h>

int gnutls_dh_params_import_raw2(gnutls_dh_params_t dh_params, const
gnutls_datum_t * prime, const gnutls_datum_t * generator, unsigned
key_bits);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_dh_params_t dh_params β€” the parameters, aka the lil container we're about to fill with fresh vibes ✨
  • const gnutls_datum_t * prime β€” holds the new prime πŸ”’
  • const gnutls_datum_t * generator β€” holds the new generator 🌱
  • unsigned key_bits β€” the private key bits (set to zero when unknown) πŸ™ˆ

πŸ‘‘ DESCRIPTION πŸ‘‘

This function will replace the pair of prime and generator for use in the Diffie-Hellman key exchange. πŸ”βœ¨ The new parameters should be stored in the appropriate gnutls_datum.

that's it, that's the whole thing β€” it swaps out your old prime + generator duo for a shiny new one and drops it right into your gnutls_datum. main character energy fr fr πŸ’…


🌈 RETURNS 🌈

On success, GNUTLS_E_SUCCESS (0) is returned πŸ₯³ otherwise a negative error code is returned 😭 (yes, negative. it's giving "something went wrong bestie", check that code).


πŸ’€ REPORTING BUGS πŸ’€

Report bugs to <bugs@gnutls.org>. Home page: https://www.gnutls.org

not me begging you to actually report the bugs instead of just suffering in silence πŸ™ they wanna hear from you, for real.

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.


🫢 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 ate it πŸ’…βœ¨ the full docs live in the gnutls manual, version 3.8.13, and this lil writeup is filed under gnutls_dh_params_import_raw2(3) β€” go forth and import those params, you iconic legend πŸ‘‘πŸ’–

πŸ“¦ where this page comes from