gnutls_privkey_import_dh_raw(3)

πŸ’– gnutls_privkey_import_dh_raw β€” the glow-up your raw DH params deserve ✨

okay bestie, so this one lives in the gnutls manual (yes, that gnutls, the TLS library, the main character of your networking stack πŸ’…). It's a function page, and it's lowkey iconic because it turns your raw Diffie-Hellman numbers into a real gnutls_privkey_t. Let's get into it 🫢


🌸 SYNOPSIS 🌸

#include <gnutls/abstract.h>

int gnutls_privkey_import_dh_raw(gnutls_privkey_t key, const
gnutls_dh_params_t params, const gnutls_datum_t * y, const
gnutls_datum_t * x);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_privkey_t key β€” this is the structure where the parsed key is gonna be stored. it's giving ✨destination✨, bestie.
  • const gnutls_dh_params_t params β€” holds the gnutls_dh_params_t. yes, it just holds the params. that's the whole job. respect it πŸ™ˆ
  • const gnutls_datum_t * y β€” holds the y. and listen β€” it's optional. not everyone brings a y to the function, and that's okay πŸ’œ
  • const gnutls_datum_t * x β€” holds the x. this one is required, no skips, no cap. periodt.

πŸ’« DESCRIPTION πŸ’«

So what does this function actually do? It takes the Diffie-Hellman raw parameters you hand it and converts them into the native gnutls_privkey_t format. The output? It gets stored in key. that's it. that's the vibe. conversion arc complete, main character energy achieved πŸ‘‘


πŸ”₯ RETURNS πŸ”₯

On success you get GNUTLS_E_SUCCESS (which is 0), and honestly? slay. Otherwise you get a negative error value, which is the function's way of saying "not today, bestie 😭". check your return values, fr fr.


⭐ SINCE ⭐

3.8.2 β€” she's not ancient, she's established. iykyk πŸ’…


πŸ¦‹ REPORTING BUGS πŸ¦‹

Found a bug? don't gatekeep it, report 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. iconic behaviour honestly, the license ate πŸŽ€


πŸ‘‘ 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, then bestie you gotta go visit:

https://www.gnutls.org/manual/

that's the plug, that's the source, no skips πŸ’–


and that's the whole page, babes ✨ this was pulled straight from the gnutls manual, version 3.8.13, and the function at the top of it all is gnutls_privkey_import_dh_raw(3). go convert some keys, you absolute legend πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from