gnutls_pkcs12_generate_mac3(3)

πŸ“¦
version 3.8.13 Β· 4 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, fedora 43, fedora 44, ubuntu stonking

πŸ’– gnutls_pkcs12_generate_mac3 β€” the manual page, but make it make sense πŸ’–

okay bestie, so this is a page from the gnutls manual, and today's main character is gnutls_pkcs12_generate_mac3. it's giving crypto, it's giving PKCS12, it's giving "yes i read the docs and so can you". let's go 🫢


✨ NAME ✨

gnutls_pkcs12_generate_mac3 β€” an API function. that's it, that's the name, no notes πŸ’…


🌸 SYNOPSIS 🌸

okay so here's the whole vibe, literally character for character:

#include <gnutls/pkcs12.h>

int gnutls_pkcs12_generate_mac3(gnutls_pkcs12_t pkcs12,
gnutls_mac_algorithm_t mac, const char * pass, unsigned int flags);

she's got four arguments and a dream ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_pkcs12_t pkcs12 β€” a pkcs12 type. yes queen, the actual structure you're working with.
  • gnutls_mac_algorithm_t mac β€” the MAC algorithm to use. pick your fighter πŸ₯Š
  • const char * pass β€” the password for the MAC. keep it secret, keep it safe πŸ”
  • unsigned int flags β€” an ORed sequence of gnutls_pkcs12_flags_t. stack 'em up with |, iykyk.

πŸ¦‹ DESCRIPTION πŸ¦‹

so what does she do? this function will generate a MAC for the PKCS12 structure. that's the whole job, and she does it well πŸ‘‘

and here's the tea: if flags contains GNUTLS_PKCS12_USE_PBMAC1, it uses the PBMAC1 key derivation function instead of the PKCS12 one. two paths, one function, very versatile of her 🌈


⭐ RETURNS ⭐

On success, GNUTLS_E_SUCCESS (0) is returned. otherwise you get a negative error value 😭 (not me getting a negative return, couldn't be me... unless πŸ‘€)


πŸ’€ REPORTING BUGS πŸ’€

found a bug? spill. Report bugs to <bugs@gnutls.org>.

Home page: https://www.gnutls.org β€” go, follow, slay 🌐


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. fr fr, that's the whole license paragraph, no cap 🫑


πŸ”₯ 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/

like, go read it, it's free, it's iconic πŸ“šβœ¨


and that's the page, bestie!! this was gnutls version 3.8.13, documented for gnutls_pkcs12_generate_mac3(3) β€” MACs generated, knowledge acquired, main character energy achieved πŸ’–πŸŒΈπŸ’… periodt.

πŸ“¦ where this page comes from