gnutls_pkcs12_bag_set_privkey(3)
β¨ gnutls_pkcs12_bag_set_privkey β¨
okay bestie, this one lives in the gnutls manual (section 3, the library-calls girlies π ), and it's genuinely one of the cuter little functions. no cap.
πΈ NAME πΈ
gnutls_pkcs12_bag_set_privkey β API function π
π SYNOPSIS π
#include <gnutls/pkcs12.h>
int gnutls_pkcs12_bag_set_privkey(gnutls_pkcs12_bag_t bag,
gnutls_x509_privkey_t privkey, const char * password, unsigned flags);
like. she takes a bag, a key, a password and some flags. iconic behavior honestly π«Ά
π¦ ARGUMENTS π¦
gnutls_pkcs12_bag_t bagβ the bag. yes literally. it's the bag. that's the whole description, she said what she said πgnutls_x509_privkey_t privkeyβ the private key that's getting copied in. not moved, copied. important!! π₯const char * passwordβ the password you're protecting the key with. and listen β it may beNULL, so don't panic if you don't have one, that's a whole valid mood β¨unsigned flagsβ should be one of thegnutls_pkcs_encrypt_flags_telements, bitwise or'd together. so like, you can stack them with|if you're feeling fancy π
π DESCRIPTION π
this function will insert the given private key into the bag. that's it, that's the job π
but here's the tea β it's just a wrapper over gnutls_pkcs12_bag_set_data(). so if you already know that one, you already know her. she's not doing anything extra, she's just being convenient and cute about it π
π RETURNS π
- on success β the index of the added bag. yay!! β
- on failure β a negative value. and no, we don't love that, but at least you'll know π
π REPORTING BUGS π
found a bug? not her fault (probably) but tell the devs anyway, they wanna know:
- Report bugs 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. so like, go off, share the love, just keep the receipts β¨
π 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/
iykyk, the Texinfo manual is lowkey the main character of documentation formats πΈ
and that's the whole page bestie!! this is from gnutls 3.8.13, the gnutls_pkcs12_bag_set_privkey(3) manual page π go forth and bag those keys β¨ππ¦
π¦ 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