ASN1_ITEM_NEW(3ossl)

πŸ“¦
version 15.1 Β· 3 versions
, in freebsd 15.1

🌸 NAME 🌸

okay so welcome to the ASN1_ITEM_NEW(3ossl) manual page, bestie β€” this one is about ASN1_item_new_ex and ASN1_item_new, the functions that literally create new ASN.1 values. slay. πŸ’–

✨ SYNOPSIS ✨

        #include <openssl/asn1.h>

        ASN1_VALUE *ASN1_item_new_ex(const ASN1_ITEM *it, OSSL_LIB_CTX *libctx,
                                     const char *propq);
        ASN1_VALUE *ASN1_item_new(const ASN1_ITEM *it);

πŸ’– DESCRIPTION πŸ’–

So ASN1_item_new_ex() creates a brand-new ASN1_VALUE structure based on the ASN1_ITEM template you give it in the it parameter. If the process needs any algorithm fetches along the way, those fetches use the OSSL_LIB_CTX you pass in libctx and the property query string you pass in propq. For the full tea on that, see "ALGORITHM FETCHING" in crypto(7) β€” it's got more info about algorithm fetching. ✨

And ASN1_item_new()? It's the same as ASN1_item_new_ex(), except it uses the default OSSL_LIB_CTX (i.e. NULL) and a NULL property query string. no cap. 🫢

πŸŽ€ RETURN VALUES πŸŽ€

Both ASN1_item_new_ex() and ASN1_item_new() return a pointer to the newly created ASN1_VALUE, or NULL on error. That's the whole vibe check. πŸ’…

πŸ¦‹ HISTORY πŸ¦‹

The function ASN1_item_new_ex() was added in OpenSSL 3.0. periodt. 🌈

okay legal besties, here's the exact copyright + license text because we do not paraphrase lawyers:

Copyright 2021 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>.

mwah πŸ’‹ β€” this page is serving OpenSSL 3.5.6, dated 2026-04-07. bye bestie! πŸŽ€βœ¨

πŸ“¦ where this page comes from