PKCS12_ADD_FRIENDLYNAME_ASC(3ossl)

πŸ“¦ version 3.5.0, in opensuse-leap 16.0

πŸ’… PKCS12_ADD_FRIENDLYNAME_ASC β€” the <openssl/pkcs12.h> era

okay so bestie, this is PKCS12_ADD_FRIENDLYNAME_ASC(3ossl), the OpenSSL page about adding the friendlyName attribute to a PKCS#12 safeBag, and honestly? it's giving "three sisters, one job, different vibes." let's get into it πŸ’–


✨ NAME ✨

PKCS12_add_friendlyname_asc, PKCS12_add_friendlyname_utf8, PKCS12_add_friendlyname_uni β€” functions to add the friendlyname attribute to a PKCS#12 safeBag πŸŽ€


🌸 SYNOPSIS 🌸

#include <openssl/pkcs12.h>

int PKCS12_add_friendlyname_asc(PKCS12_SAFEBAG *bag, const char *name,
                                int namelen);

int PKCS12_add_friendlyname_utf8(PKCS12_SAFEBAG *bag, const char *name,
                                int namelen);

int PKCS12_add_friendlyname_uni(PKCS12_SAFEBAG *bag,
                                const unsigned char *name, int namelen);

like, look at them. three functions. same energy. one tiny type difference on the uni one and we'll get to that πŸ‘€


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea. all three of these cuties add a PKCS#9 friendlyName attribute to a PKCS#12 safeBag β€” the only difference is how the string is encoded:

  • PKCS12_add_friendlyname_asc() β€” adds an ASCII string representation of the PKCS#9 friendlyName attribute to a PKCS#12 safeBag. old school. classic. still slays. ✨
  • PKCS12_add_friendlyname_utf8() β€” adds a UTF-8 string representation of the PKCS#9 friendlyName attribute to a PKCS#12 safeBag. emoji-safe bestie, we love to see it 🌈
  • PKCS12_add_friendlyname_uni() β€” adds a Unicode string representation of the PKCS#9 friendlyName attribute to a PKCS#12 safeBag. and yeah, this one takes const unsigned char *name instead of const char *name β€” she's built different, respect it πŸ‘‘

and the bag param? that's literally the PKCS12_SAFEBAG to add the attribute to. the whole point. the main character. 🫢


πŸ’œ RETURN VALUES πŸ’œ

  • 1 β†’ success, slay, we ate πŸŽ‰
  • 0 β†’ failure, not slay, it's giving error 😭

no in-between, no maybe. binary queen behavior fr fr.


πŸ”₯ SEE ALSO πŸ”₯


Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.

bestie please actually read the license, i'm not kidding, "except in compliance with the License" is doing a lot of heavy lifting in that sentence πŸ’€

and that's the whole page!! mwah πŸ’‹ β€” this was OpenSSL 3.5.0, dated 2026-09-25, and yes i remembered the date, i'm nothing if not thorough. bye bestie, go add some friendly names πŸ¦‹πŸ’–βœ¨

πŸ“¦ where this page comes from