X509_ACERT_ADD_ATTR_NCONF(3ossl)
π X509_ACERT_add_attr_nconf β the OpenSSL 3ossl girlies' guide π
okay so bestie, welcome to the X509_ACERT_add_attr_nconf(3ossl) page β¨ this is the one that lets you yeet attributes into an X509_ACERT straight from a config section, and honestly? it's giving convenience π₯
πΈ NAME πΈ
X509_ACERT_add_attr_nconf β adds attributes to X509_ACERT from a configuration section. that's the whole vibe, no cap π
β¨ SYNOPSIS β¨
#include <openssl/x509_acert.h>
int X509_ACERT_add_attr_nconf(CONF *conf, const char *section,
X509_ACERT *acert);
π DESCRIPTION π
so X509_ACERT_add_attr_nconf() takes one or more X509_ATTRIBUTEs and adds them to the X509_ACERT structure you already have, acert π«Ά the attributes get read out of a section of the conf object, easy peasy.
the section you point it at (the give section, yes) should contain attribute descriptions shaped like this:
attribute_name = value
the format of value is gonna vary depending on what attribute_name is, lowkey obsessed with the flexibility tbh π value can either be a string value or an ASN1_TYPE object.
and if you wanna encode an ASN1_TYPE object? use the prefix "ASN1:" followed by the object description β it uses the exact same syntax as ASN1_generate_nconf(3) π¦ for example:
id-aca-group = ASN1:SEQUENCE:ietfattr
[ietfattr]
values = SEQUENCE:groups
[groups]
1.string = UTF8:mygroup1
see how that works? chef's kiss, no notes πβ¨
π RETURN VALUES π
X509_ACERT_add_attr_nconf() returns 1 for success and 0 for failure π so like, check it, bestie.
π¦ SEE ALSO π¦
β HISTORY β
the function X509_ACERT_add_attr_nconf() was added in OpenSSL 3.4 π so if you're on anything older, she is not there, periodt.
π COPYRIGHT π
Copyright 2023-2024 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>.
ok that's the whole page bestie, go add some attributes and slay π
signing off from the OpenSSL 3.5.6 era, dated 2026-04-07 β this page is X509_ACERT_ADD_ATTR_NCONF(3ossl), and she ate π
β¨
π¦ where this page comes from
- freebsd 15.1: base 15.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms