gnutls_privkey_init(3)

πŸ’– gnutls_privkey_init(3) πŸ’–

okay bestie, welcome to the gnutls manual, page gnutls_privkey_init(3). this one's short and sweet but it's literally the glow-up moment for your private key object, so pay attention πŸŽ€


✨ NAME ✨

gnutls_privkey_init β€” it's an API function, and it's giving origin story πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/abstract.h>

int gnutls_privkey_init(gnutls_privkey_t * key);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_privkey_t * key β€” a pointer to the type you want to initialize. yes queen, that's the whole thing, it's a pointer to the thing that's about to become your private key object 🫢

πŸ‘‘ DESCRIPTION πŸ‘‘

so this function initializes a private key object, periodt. and once it exists? it can be used to generate, import, and perform cryptographic operations on the associated private key. main character energy, honestly 🌈

now, important note, no cap: when the underlying private key is a PKCS11 key (i.e., when it was imported with a PKCS11 URI), the limitations of gnutls_pkcs11_privkey_init() apply to this object too. same rules, same vibe, it's a package deal 😭

and in versions of GnuTLS later than 3.5.11, the object is protected using locks, and a single gnutls_privkey_t can be re-used by many threads. slay. but β€” for performance, it is recommended to utilize one object per key per thread. so like, sharing is technically fine, but the efficient move is one per thread, okay? iykyk ⭐


πŸ’€ RETURNS πŸ’€

on success, GNUTLS_E_SUCCESS (0) is returned. otherwise you get a negative error value, which is the universe's way of saying "bestie, no" πŸ™ˆ


⏳ SINCE ⏳

2.12.0 β€” an icon since way back, we love longevity πŸ’œ


πŸ› REPORTING BUGS πŸ›

found a bug? report it to <bugs@gnutls.org>. don't suffer in silence, that's not the vibe.

home page: https://www.gnutls.org ✨


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. (translation: go off, 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/

πŸ’… and that's the whole page, bestie. go init that key.

this has been the gnutls manual, version 3.8.13, page gnutls_privkey_init(3) β€” ty for reading, you ate, periodt πŸ«Άβœ¨πŸ’–

πŸ“¦ where this page comes from