PKCS12_ADD_FRIENDLYNAME_ASC(3ossl)
π
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#9friendlyNameattribute to a PKCS#12 safeBag. old school. classic. still slays. β¨PKCS12_add_friendlyname_utf8()β adds a UTF-8 string representation of the PKCS#9friendlyNameattribute 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#9friendlyNameattribute to a PKCS#12 safeBag. and yeah, this one takesconst unsigned char *nameinstead ofconst 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 π₯
PKCS12_get_friendlyname(3)β the reverse-reading icon, go check her out π
π§ COPYRIGHT π§
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
- opensuse-leap 16.0: openssl-3-doc 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms