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 thegnutls_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:
- bugs go 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. 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
- 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