gnutls_pkcs11_privkey_cpy(3)

πŸ’– gnutls_pkcs11_privkey_cpy(3) πŸ’–

okay bestie, sit down, hydrate, and let me tell you about this lil function from the gnutls manual β€” gnutls_pkcs11_privkey_cpy, the copy-paste of the PKCS#11 private key world πŸŽ€


✨ NAME ✨

gnutls_pkcs11_privkey_cpy β€” it's an API function, periodt πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/pkcs11.h>

int gnutls_pkcs11_privkey_cpy(gnutls_pkcs11_privkey_t dst,
gnutls_pkcs11_privkey_t src);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_pkcs11_privkey_t dst β€” the destination key, and girl, it should be initialized first. don't come in here with an uninitialized dst, that's not the vibe πŸ™ˆ
  • gnutls_pkcs11_privkey_t src β€” the source key. the original. the blueprint. the main character πŸ‘‘

πŸ’« DESCRIPTION πŸ’«

So what does it actually do? This function will copy a private key from source to destination key. That's it, that's the whole thing, and honestly? iconic.

⚠️ heads up: the destination has to be initialized. No exceptions, no shortcuts, no "it'll probably be fine" β€” it will not be fine. Initialize that dst first πŸ’€

πŸ”₯ RETURNS πŸ”₯

On success, GNUTLS_E_SUCCESS (0) is returned. Otherwise you get a negative error value β€” which is the function's way of saying "not me being upset with you rn 😭". Check it. Always check it.


⭐ SINCE ⭐

3.4.0 β€” she's been around a minute, she's a legacy icon 🫢


πŸŽ€ REPORTING BUGS πŸŽ€

Found something sus? Report bugs to <bugs@gnutls.org>.

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.


🌈 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, no cap πŸ’…βœ¨ this was the gnutls manual, version 3.8.13, page gnutls_pkcs11_privkey_cpy(3) β€” go forth, copy your keys, initialize your destinations, and slay πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from