ASN1_ITEM_LOOKUP(3ossl)
π ASN1_ITEM_LOOKUP(3ossl) π
okay bestie, gather round, we're doing OpenSSL today and honestly? this one's short and sweet, it's giving "little function, big main character energy" β¨
πΈ NAME πΈ
ASN1_ITEM_lookup, ASN1_ITEM_get β lookup ASN.1 structures π¦
β¨ SYNOPSIS β¨
#include <openssl/asn1.h>
const ASN1_ITEM *ASN1_ITEM_lookup(const char *name);
const ASN1_ITEM *ASN1_ITEM_get(size_t i);
like yes that's the whole thing, she's compact π
π DESCRIPTION π
so here's the tea, bestie. there's two ways to go grab an ASN1_ITEM and you get to pick based on what you already have lying around π
ASN1_ITEM_lookup()β hand it aname, and it hands you back theASN1_ITEMthat goes by that name. it's a name-based glow-up, very "do you know her? yes, that's her" π«ΆASN1_ITEM_get()β this one's indexed instead of named. give it indexiand it gives you theASN1_ITEMsitting at that spot. and listen, this is the important bit: ifiis out of range, it returnsNULL. so like, vibe check your index first, fr fr π
π¦ RETURN VALUES π¦
both ASN1_ITEM_lookup() and ASN1_ITEM_get() come through with either a valid ASN1_ITEM structure β slay π β or NULL if something went sideways. that's it, that's the whole deal. no cap π
ngl, NULL is your β¨situationship warningβ¨ here. always check before you go dereferencing, okay? protect your peace AND your program πΈ
π SEE ALSO π
ERR_get_error(3)β for when you wanna know why things went wrong, iykyk π₯
π COPYRIGHT π
Copyright 2016 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>.
and that's the whole page, bestie!! π§β¨ this one's from OpenSSL 3.5.9, dated 2026-09-29 β so go forth, look up your ASN.1 structures, and remember: valid ASN1_ITEM = iconic, NULL = check yourself π periodt π
π¦ where this page comes from
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms