gnutls_x509_pr...import_gost_raw(3)
π¦ gnutls_x509_privkey_import_gost_raw(3) β the gnutls manual, but make it make sense π¦
okay bestie, so this page lives in the gnutls manual, and it's all about one little function that scoops up a GOST private key and drops it into gnutls's own β¨nativeβ¨ format. let's get into it π
β¨ NAME β¨
gnutls_x509_privkey_import_gost_raw β it's an API function, and yes it's exactly as niche as it sounds π
πΈ SYNOPSIS πΈ
#include <gnutls/x509.h>
int gnutls_x509_privkey_import_gost_raw(gnutls_x509_privkey_t key,
gnutls_ecc_curve_t curve, gnutls_digest_algorithm_t digest,
gnutls_gost_paramset_t paramset, const gnutls_datum_t * x, const
gnutls_datum_t * y, const gnutls_datum_t * k);
she takes seven whole arguments, no cap. hydrate before reading π«Ά
π ARGUMENTS π
gnutls_x509_privkey_t keyβ this is the data that stores the parsed key, i.e. where the good stuff ends up πgnutls_ecc_curve_t curveβ holds the curve, periodtgnutls_digest_algorithm_t digestβ will hold the digestgnutls_gost_paramset_t paramsetβ will hold the GOST parameter set IDconst gnutls_datum_t * xβ holds the x-coordinate πconst gnutls_datum_t * yβ holds the y-coordinate πconst gnutls_datum_t * kβ holds the k, aka the private key π€«
π DESCRIPTION π
so this function takes the given GOST private key's parameters and converts them into the native gnutls_x509_privkey_t format. the glow-up happens in place β the output gets stored in key π«
about digest: it should be one of GNUTLS_DIG_GOSR_94, GNUTLS_DIG_STREEBOG_256 or GNUTLS_DIG_STREEBOG_512. pick one, bestie, that's the whole menu π
and if paramset is set to GNUTLS_GOST_PARAMSET_UNKNOWN, a default one gets selected depending on digest. so like, it'll figure out the vibe for you β¨
β οΈ NOTE β οΈ
parameters should be stored with least significant byte first. on version 3.6.3 big-endian format was used incorrectly. π
so yeah. if you're dealing with old 3.6.3 era data, that byte order is giving chaos. be careful, fr fr.
π₯ RETURNS π₯
on success, GNUTLS_E_SUCCESS (0) is returned π otherwise you get a negative error value. sad girl hours π
β SINCE β
3.6.3 β she's been here a minute π
π REPORTING BUGS π
found a bug? don't gatekeep it, report it 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 behavior honestly π«Ά
π§ 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 π this was the gnutls manual, version 3.8.13 β go forth and import your GOST keys correctly, 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