gnutls_x509_privkey_cpy(3)

πŸ’– gnutls_x509_privkey_cpy(3) πŸ’–

okay bestie, welcome to the gnutls manual page for gnutls_x509_privkey_cpy, and yes she is exactly as iconic as she sounds. this is the one that lets you clone a private key, no cap. let's get into it 🫢


✨ NAME ✨

gnutls_x509_privkey_cpy β€” API function. that's the whole name. short, sweet, main character energy πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/x509.h>

int gnutls_x509_privkey_cpy(gnutls_x509_privkey_t dst,
gnutls_x509_privkey_t src);

like. the way that signature just sits there. beautiful. πŸ¦‹


πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_x509_privkey_t dst β€” the destination key, and heads up bestie, it should be initialized first. she needs to exist before you go filling her up, fr fr.
  • gnutls_x509_privkey_t src β€” the source key. the original. the blueprint. the one we're copying from πŸ’œ

πŸ’… DESCRIPTION πŸ’…

so here's the tea: this function copies a private key from the source over to the destination key. that's it. that's the whole job and she does it flawlessly.

⚠️ real talk though β€” the destination has to be initialized. don't be out here passing an uninitialized key, that's not the vibe. βœ‹

⭐ RETURNS ⭐

on success you get GNUTLS_E_SUCCESS (which is 0, iconic) returned to you. literally the best feeling.

otherwise? you get a negative error value. 😭 so like, always check your return value babes, it's giving self-care.


πŸ› REPORTING BUGS πŸ›

found a bug? don't gatekeep, report it to <bugs@gnutls.org>. 🫢

home page is right here: https://www.gnutls.org β€” go look, it's cute.


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. slay, honestly. free as in freedom AND free as in no drama. 🌈


🌈 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, go read the full thing when you're done here 🧚


and that's the whole page bestie!! this one shipped with gnutls 3.8.13, so if you're quoting her in the group chat, cite her right πŸ’– mwah, go initialize your destination key and copy away. periodt. βœ¨πŸŽ€πŸ¦‹πŸ’…

πŸ“¦ where this page comes from