gnutls_pkcs7_add_attr(3)

πŸ’– gnutls_pkcs7_add_attr(3) πŸ’–

okay so bestie, welcome to the gnutls manual page for gnutls_pkcs7_add_attr β€” it's literally the API function that adds a PKCS 7 attribute to a list, and we're gonna get you all the way together on it ✨


πŸŽ€ NAME πŸŽ€

gnutls_pkcs7_add_attr β€” API function, no cap.


🌸 SYNOPSIS 🌸

#include <gnutls/pkcs7.h>

int gnutls_pkcs7_add_attr(gnutls_pkcs7_attrs_t * list, const char * oid,
gnutls_datum_t * data, unsigned flags);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_pkcs7_attrs_t * list β€” a list of attributes you already have, or a pointer to NULL if this is the very first one 🫢
  • const char * oid β€” the OID of the attribute you wanna set, periodt
  • gnutls_datum_t * data β€” the raw, DER-encoded data of the attribute you're setting πŸ‘‘
  • unsigned flags β€” either zero, or GNUTLS_PKCS7_ATTR_ENCODE_OCTET_STRING πŸ’…

✨ DESCRIPTION ✨

This function will set a PKCS 7 attribute in the list you handed it. And heads up bestie β€” if this function fails, the previous list would be deallocated 😭 so like, don't go reaching for it afterwards, it's gone.

Also, quick vibe check: any attributes you set with this function must either be DER or BER encoded, unless a special flag is present. iykyk.


🌈 RETURNS 🌈

On success, the new list head πŸŽ‰ β€” otherwise NULL. that's it, that's the return.


⭐ SINCE ⭐

3.4.2 β€” an icon, an OG, she's been here a minute πŸ•°οΈ


πŸ› REPORTING BUGS πŸ›

Found a bug? spill 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. slay, honestly 🫢


πŸ”₯ 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!! this one came from the gnutls manual, version 3.8.13, and yeah the footer said gnutls_pkcs7_add_attr(3) too β€” go forth and set those attributes, main character energy only πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from