1=pod 2 3=head1 NAME 4 5X509_ACERT_add1_attr, 6X509_ACERT_add1_attr_by_NID, 7X509_ACERT_add1_attr_by_OBJ, 8X509_ACERT_add1_attr_by_txt, 9X509_ACERT_delete_attr 10- X509_ACERT attribute functions 11 12=head1 SYNOPSIS 13 14 #include <openssl/x509_acert.h> 15 16 int X509_ACERT_add1_attr(X509_ACERT *x, X509_ATTRIBUTE *attr); 17 int X509_ACERT_add1_attr_by_NID(X509_ACERT *x, int nid, int type, 18 const void *bytes, int len); 19 int X509_ACERT_add1_attr_by_OBJ(X509_ACERT *x, const ASN1_OBJECT *obj, 20 int type, const void *bytes, int len); 21 int X509_ACERT_add1_attr_by_txt(X509_ACERT *x, const char *attrname, int type, 22 const unsigned char *bytes, int len); 23 X509_ATTRIBUTE *X509_ACERT_delete_attr(X509_ACERT *x, int loc); 24 25=head1 DESCRIPTION 26 27X509_ACERT_add1_attr() adds a constructed X509_ATTRIBUTE B<attr> to the 28existing X509_ACERT structure B<x>. 29 30X509_ACERT_add1_attr_by_NID() and X509_ACERT_add1_attr_by_OBJ() 31add an attribute of type I<nid> or I<obj> with a value of ASN1 32type I<type> constructed using I<len> bytes from I<bytes>. 33 34X509_ACERT_add1_attr_by_txt() adds an attribute of type I<attrname> with a value of 35ASN1 type I<type> constructed using I<len> bytes from I<bytes>. 36 37X509_ACERT_delete_attr() will delete the I<loc>th attribute from I<x> and 38return a pointer to it or NULL if there are fewer than I<loc> attributes 39contained in I<x>. 40 41=head1 RETURN VALUES 42 43X509_ACERT_add1_attr(), X509_ACERT_add1_attr_by_NID(), and 44X509_ACERT_add1_attr_by_OBJ() return 1 for success and 0 for failure. 45 46X509_ACERT_delete_attr() returns a B<X509_ATTRIBUTE> pointer on 47success or NULL on failure. 48 49=head1 SEE ALSO 50 51L<X509_ACERT_get_attr_count(3)> 52 53=head1 HISTORY 54 55X509_ACERT_add1_attr(), X509_ACERT_add1_attr_by_NID(), X509_ACERT_add1_attr_by_OBJ(), 56X509_ACERT_add1_attr_by_txt() and X509_ACERT_delete_attr() were added in OpenSSL 3.4. 57 58=head1 COPYRIGHT 59 60Copyright 2023-2024 The OpenSSL Project Authors. All Rights Reserved. 61 62Licensed under the Apache License 2.0 (the "License"). You may not use 63this file except in compliance with the License. You can obtain a copy 64in the file LICENSE in the source distribution or at 65L<https://www.openssl.org/source/license.html>. 66 67=cut 68