PKCS12_ADD_LOCALKEYID(3ossl)
π PKCS12_ADD_LOCALKEYID π
okay so this is the 3ossl manpage for PKCS12_add_localkeyid, one of those tiny OpenSSL helpers that does exactly one thing and does it slay. bestie, it's a PKCS#12 function, from openssl/pkcs12.h, and it's genuinely short β we're in and out, no cap. π
πΈ NAME πΈ
PKCS12_add_localkeyid β adds the localKeyId attribute to a PKCS#12 safeBag. that's it. that's the whole job. iconic behavior honestly. β¨
π¦ SYNOPSIS π¦
#include <openssl/pkcs12.h>
int PKCS12_add_localkeyid(PKCS12_SAFEBAG *bag, const char *name,
int namelen);
literally three things go in: the bag, a name, and a namelen. int in, int out. we love a clean signature. π
π DESCRIPTION π
okay so here's the vibe: PKCS12_add_localkeyid() adds an octet string representation of the PKCS#9 localKeyId attribute to a PKCS#12 safeBag. yes, octet string representation β that's the exact wording, i'm not paraphrasing that one because it's doing heavy lifting, iykyk. π₯
bagβ thePKCS12_SAFEBAGyou're adding the attribute to. this is the one the manpage actually explains, so it's the main character here. π
the signature also carries name and namelen (both in the synopsis above, character for character, don't come for me) β that's the full parameter list, periodt. π«Ά
bestie note: the docs here are short and sweet, so don't go reading extra behavior into it that isn't written down. if it's not on this page, it's not on this page. π
β RETURN VALUES β
- returns
1for success π - returns
0for failure π
that's the whole spectrum. binary queen. π
π§ SEE ALSO π§
PKCS12_add_friendlyname_asc(3)β go read that one next, it's the sibling vibe. πΈ
π 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>.
fr fr read the license before you go copying stuff. it's giving legal main character energy and it applies to you too. π
and that's the page!! this was OpenSSL 3.5.0, dated 2026-09-25, manual page PKCS12_ADD_LOCALKEYID(3ossl) β mwah, go add that attribute, bestie πβ¨π
π¦ 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