PKCS12_GET_FRIENDLYNAME(3ossl)
π PKCS12_GET_FRIENDLYNAME π
okay so bestie, welcome to PKCS12_get_friendlyname β that's the OpenSSL man page (section 3ossl, yes she's fancy) that hands you the cute little nickname attached to a PKCS#12 safeBag. it's giving "name tag at a party but the party is a crypto blob" π
β¨ NAME β¨
PKCS12_get_friendlyname β retrieve the friendlyName attribute from a PKCS#12 safeBag. literally just fetching the vibe-check name tag, no cap π
πΈ SYNOPSIS πΈ
#include <openssl/pkcs12.h>
char *PKCS12_get_friendlyname(PKCS12_SAFEBAG *bag);
one include, one function, zero drama. we love a low-effort queen π«Ά
π¦ DESCRIPTION π¦
so PKCS12_get_friendlyname() retrieves a UTF-8 string representation of the PKCS#9 friendlyName attribute for a PKCS#12 safeBag item. that's it, that's the whole job β it goes in, it finds the name, it comes back with a UTF-8 string. iconic behaviour honestly β¨
bag is the PKCS12_SAFEBAG you want to retrieve the attribute from. like, hand her the bag and she'll tell you whose name is written on it π
π RETURN VALUES π
you get a UTF-8 string back β or NULL if the attribute was either not present or an error occurred. π so yeah, NULL is doing double duty here (missing name or something went wrong), which means if you get NULL you don't automatically know which one it is. iykyk.
also very important bestie: the returned string is allocated by OpenSSL and should be freed by the user. so yes, you have to clean up after yourself. no leaving your trash in the group chat π
π SEE ALSO π
PKCS12_add_friendlyname_asc(3)β the glow-up counterpart that adds the friendlyName instead of reading it. go give her a visit π«
π 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>. π
and that's the whole page, bestie β slay π
β¨ this was OpenSSL version 3.5.0, dated 2026-09-25, and PKCS12_GET_FRIENDLYNAME(3ossl) is out ππ¦π
π¦ 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