gnutls_pkcs12_bag_set_key_id(3)
π gnutls_pkcs12_bag_set_key_id π
okay so bestie, welcome to the gnutls manual β yes that gnutls, the crypto library, and yes we're about to make a PKCS#12 bag glow up. this page is literally called gnutls_pkcs12_bag_set_key_id, and it's an API function, so grab a strawberry π and let's go.
β¨ NAME β¨
gnutls_pkcs12_bag_set_key_id β API function. that's it, that's the name, no notes π
πΈ SYNOPSIS πΈ
#include <gnutls/pkcs12.h>
int gnutls_pkcs12_bag_set_key_id(gnutls_pkcs12_bag_t bag, unsigned indx,
const gnutls_datum_t * id);
like, look at her. iconic signature. #include <gnutls/pkcs12.h> and you're in. π
π¦ ARGUMENTS π¦
gnutls_pkcs12_bag_t bagβ the bag. yes, a literal bag, we love a container moment. it's the bag. πunsigned indxβ which element of the bag we're adding the id to. the bag's element to add the id, fr fr.const gnutls_datum_t * idβ the ID. that's the whole description, no cap. π
π DESCRIPTION π
so here's the tea: this function will add the given key ID to the bag element you picked, the one specified by the index. π«Ά
the key ID gets encoded as a 'Local key identifier' bag attribute β which, lowkey, is the whole point, because that attribute is usually used to distinguish the local private key and the certificate pair. iykyk. π₯
so like, private key on one side, cert on the other, and this lil attribute is how you tell them apart. main character energy for an attribute honestly.
β RETURNS β
on success, GNUTLS_E_SUCCESS (0) is returned. slay. β
otherwise you get a negative error value. or a negative error code on error. π yeah it says both, and we're keeping both, don't @ me.
ngl bestie: if it's negative, something went wrong. check it. always check it.
π REPORTING BUGS π
found a bug? not me being shocked π 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. periodt. π
π§ 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/
okay that's the whole page, you ate that. go forth and set those key IDs. π¦β¨
signing off from the gnutls manual, version 3.8.13, page gnutls_pkcs12_bag_set_key_id(3) β mwah, bye bestie πππΈ
π¦ 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