D2I_X509_ATTRIBUTE(3)
π D2I_X509_ATTRIBUTE(3) π
okay so bestie, this is the libcrypto page for d2i_X509_ATTRIBUTE and i2d_X509_ATTRIBUTE β the decode/encode duo for generic X.501 Attribute. it's giving "one job, done well" energy and honestly? iconic.
β¨ NAME β¨
d2i_X509_ATTRIBUTE, i2d_X509_ATTRIBUTE β decode and encode generic X.501 Attribute π
πΈ SYNOPSIS πΈ
library βlibcryptoβ
#include <openssl/x509.h>
X509_ATTRIBUTE *
d2i_X509_ATTRIBUTE(X509_ATTRIBUTE **val_out,
const unsigned char **der_in, long length);
int
i2d_X509_ATTRIBUTE(X509_ATTRIBUTE *val_in, unsigned char **der_out);
π¦ DESCRIPTION π¦
so d2i_X509_ATTRIBUTE() and i2d_X509_ATTRIBUTE() decode and encode a generic ASN.1 Attribute structure β the one defined in X.501 section 8.2, iykyk π
ngl, for all the deets about the semantics, examples, caveats, and bugs, you gotta go see ASN1_item_d2i(3). literally the main character of this whole vibe check, so don't skip it π«Ά
π RETURN VALUES π
d2i_X509_ATTRIBUTE()β returns anX509_ATTRIBUTEobject, orNULLif an error occurs πi2d_X509_ATTRIBUTE()β returns the number of bytes successfully encoded, or a negative value if an error occurs π
π₯ SEE ALSO π₯
ASN1_item_d2i(3), d2i_PKCS12(3), d2i_PKCS8_PRIV_KEY_INFO(3), d2i_X509_EXTENSION(3), d2i_X509_REQ(3), X509_ATTRIBUTE_new(3)
β STANDARDS β
ITU-T Recommendation X.501, also known as ISO/IEC 9594-2: Information Technology β Open Systems Interconnection β The Directory: Models, section 8.2: Overall structure π
π HISTORY π
d2i_X509_ATTRIBUTE() and i2d_X509_ATTRIBUTE() first appeared in SSLeay 0.5.1 and have been available since OpenBSD 2.4. old money, fr fr π
π that's the whole page bestie β every flag, every return value, every SEE ALSO, all of it, no cap π
Debian, June 8, 2025 β that's the version + date on this beauty, so go off and encode responsibly π§ββοΈβ¨π
π¦ where this page comes from
- alpine 3.24: libressl-doc 4.3.1-r0 Β· custom
- arch rolling: libressl 4.4.0-1 Β· ISC AND custom:OpenSSL
- Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms