xref: /freebsd/crypto/openssl/doc/man3/ASN1_item_new.pod (revision a90b9d0159070121c221b966469c3e36d912bf82)
1=pod
2
3=head1 NAME
4
5ASN1_item_new_ex, ASN1_item_new
6- create new ASN.1 values
7
8=head1 SYNOPSIS
9
10 #include <openssl/asn1.h>
11
12 ASN1_VALUE *ASN1_item_new_ex(const ASN1_ITEM *it, OSSL_LIB_CTX *libctx,
13                              const char *propq);
14 ASN1_VALUE *ASN1_item_new(const ASN1_ITEM *it);
15
16=head1 DESCRIPTION
17
18ASN1_item_new_ex() creates a new B<ASN1_VALUE> structure based on the
19B<ASN1_ITEM> template given in the I<it> parameter. If any algorithm fetches are
20required during the process then they will use the B<OSSL_LIB_CTX> provided in
21the I<libctx> parameter and the property query string in I<propq>. See
22L<crypto(7)/ALGORITHM FETCHING> for more information about algorithm fetching.
23
24ASN1_item_new() is the same as ASN1_item_new_ex() except that the default
25B<OSSL_LIB_CTX> is used (i.e. NULL) and with a NULL property query string.
26
27=head1 RETURN VALUES
28
29ASN1_item_new_ex() and ASN1_item_new() return a pointer to the newly created
30B<ASN1_VALUE> or NULL on error.
31
32=head1 HISTORY
33
34The function ASN1_item_new_ex() was added in OpenSSL 3.0.
35
36=head1 COPYRIGHT
37
38Copyright 2021 The OpenSSL Project Authors. All Rights Reserved.
39
40Licensed under the Apache License 2.0 (the "License").  You may not use
41this file except in compliance with the License.  You can obtain a copy
42in the file LICENSE in the source distribution or at
43L<https://www.openssl.org/source/license.html>.
44
45=cut
46