X509_ACERT_ADD1_ATTR(3ossl)
π X509_ACERT_ADD1_ATTR π
okay so this is the X509_ACERT_ADD1_ATTR(3ossl) page β it's from the 3ossl manual, and it's all about handling attributes on an X509_ACERT structure. attribute girlbossing, basically π
β¨ NAME β¨
X509_ACERT_add1_attr, X509_ACERT_add1_attr_by_NID, X509_ACERT_add1_attr_by_OBJ, X509_ACERT_add1_attr_by_txt, X509_ACERT_delete_attr β the X509_ACERT attribute functions, aka the whole add-and-delete squad π
πΈ SYNOPSIS πΈ
#include <openssl/x509_acert.h>
int X509_ACERT_add1_attr(X509_ACERT *x, X509_ATTRIBUTE *attr);
int X509_ACERT_add1_attr_by_NID(X509_ACERT *x, int nid, int type,
const void *bytes, int len);
int X509_ACERT_add1_attr_by_OBJ(X509_ACERT *x, const ASN1_OBJECT *obj,
int type, const void *bytes, int len);
int X509_ACERT_add1_attr_by_txt(X509_ACERT *x, const char *attrname, int type,
const unsigned char *bytes, int len);
X509_ATTRIBUTE *X509_ACERT_delete_attr(X509_ACERT *x, int loc);
π¦ DESCRIPTION π¦
X509_ACERT_add1_attr() takes an already-constructed X509_ATTRIBUTE called attr and adds it to the existing X509_ACERT structure x. like, you did the construction work already, she just files it in the right place β¨
X509_ACERT_add1_attr_by_NID() and X509_ACERT_add1_attr_by_OBJ() add an attribute of type nid or obj, with a value of ASN1 type type constructed using len bytes from bytes. two ways in, same destination, iykyk π«
X509_ACERT_add1_attr_by_txt() adds an attribute of type attrname with a value of ASN1 type type constructed using len bytes from bytes. name it with text and she'll handle it π
X509_ACERT_delete_attr() deletes the locth attribute from x and returns a pointer to it β or NULL if there are fewer than loc attributes contained in x. so if you're out here asking for attribute number 12 when she only has 3, you get NULL. respectfully. π
π₯ RETURN VALUES π₯
X509_ACERT_add1_attr(), X509_ACERT_add1_attr_by_NID(), and X509_ACERT_add1_attr_by_OBJ() return 1 for success and 0 for failure. classic binary slay, no cap π―
X509_ACERT_delete_attr() returns a X509_ATTRIBUTE pointer on success or NULL on failure. periodt π
π SEE ALSO π
X509_ACERT_get_attr_count(3) β go count your attributes, bestie π«Ά
π HISTORY π
X509_ACERT_add1_attr(), X509_ACERT_add1_attr_by_NID(), X509_ACERT_add1_attr_by_OBJ(), X509_ACERT_add1_attr_by_txt() and X509_ACERT_delete_attr() were added in OpenSSL 3.4. so they're new-new, fresh out the box π
π 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>.
fr fr read the license before you go touching this, it's giving "legal obligations" and she is not joking about that one π
and that's the page!! mwah π this was version 3.5.6, dated 2026-04-07, and yeah β that's X509_ACERT_ADD1_ATTR(3ossl) signing off π§ββοΈβπ
π¦ 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