gnutls_psk_for...ported_identity(3)

✨ gnutls_psk_format_imported_identity β€” the glow-up era ✨

okay bestie, welcome to the gnutls manual, and specifically to gnutls_psk_format_imported_identity(3) πŸ’… this is a lil API function that takes your external PSK identity and gives it a whole new imported look, no cap. it's giving makeover montage, but for cryptographic identity blobs 🌈


🌸 NAME 🌸

gnutls_psk_format_imported_identity β€” literally just an API function, bestie πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gnutls/gnutls.h>

int gnutls_psk_format_imported_identity(const gnutls_datum_t * identity,
const gnutls_datum_t * context, gnutls_protocol_t version,
gnutls_digest_algorithm_t hash, gnutls_datum_t * imported_identity);

like yes, five arguments, she's high maintenance but she delivers πŸ’–


πŸ‘‘ ARGUMENTS πŸ‘‘

  • const gnutls_datum_t * identity β€” the external identity, the main character we're about to transform ✨
  • const gnutls_datum_t * context β€” optional contextual information. optional!! she can come or not, she's chill like that πŸ¦‹
  • gnutls_protocol_t version β€” the protocol version that this PSK is being imported to 🌸
  • gnutls_digest_algorithm_t hash β€” the hash algorithm used for the KDF, iykyk πŸ”₯
  • gnutls_datum_t * imported_identity β€” where the imported identity gets stored, bestie. this is the output slot, the lil pedestal πŸ’œ

πŸ’« DESCRIPTION πŸ’«

so the way that this works: it formats an external PSK identity, identity, into an imported form β€” which RFC 9258 calls ImportedIdentity. that's it, that's the whole vibe ✨ no cap, she just reformats and hands it back to you looking fancy.

⚠️ real talk though: upon success, the data field of imported_identity is allocated using gnutls_malloc(), and the caller must free the memory after use. that memory is YOURS to clean up, bestie, don't leave her hanging 😭 leaking memory is not the slay you think it is πŸ’€

🌟 RETURNS 🌟

GNUTLS_E_SUCCESS (0) on success πŸŽ‰ otherwise a negative error code, which is the function's way of saying "not today" πŸ™ˆ


πŸŽ€ SINCE πŸŽ€

3.8.1 β€” she's been around, she's an icon, she's established πŸ‘‘


πŸ“£ REPORTING BUGS πŸ“£

found a bug? don't be shy, report it to <bugs@gnutls.org>. they want to hear from you, fr fr 🫢

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. 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/


and that's the whole page, bestie ✨ go forth and format those imported identities, you absolute legend πŸ’–

mwah πŸ’‹ this has been gnutls version 3.8.13, page gnutls_psk_for...ported_identity(3), signed off with love and a lil sparkle πŸŽ€

πŸ“¦ where this page comes from