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