xref: /freebsd/crypto/openssl/doc/man3/DSA_new.pod (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1e71b7053SJung-uk Kim=pod
2e71b7053SJung-uk Kim
3e71b7053SJung-uk Kim=head1 NAME
4e71b7053SJung-uk Kim
5e71b7053SJung-uk KimDSA_new, DSA_free - allocate and free DSA objects
6e71b7053SJung-uk Kim
7e71b7053SJung-uk Kim=head1 SYNOPSIS
8e71b7053SJung-uk Kim
9e71b7053SJung-uk Kim #include <openssl/dsa.h>
10e71b7053SJung-uk Kim
11*b077aed3SPierre ProncheryThe following functions have been deprecated since OpenSSL 3.0, and can be
12*b077aed3SPierre Proncheryhidden entirely by defining B<OPENSSL_API_COMPAT> with a suitable version value,
13*b077aed3SPierre Proncherysee L<openssl_user_macros(7)>:
14*b077aed3SPierre Pronchery
15e71b7053SJung-uk Kim DSA* DSA_new(void);
16e71b7053SJung-uk Kim
17e71b7053SJung-uk Kim void DSA_free(DSA *dsa);
18e71b7053SJung-uk Kim
19e71b7053SJung-uk Kim=head1 DESCRIPTION
20e71b7053SJung-uk Kim
21*b077aed3SPierre ProncheryAll of the functions described on this page are deprecated.
22*b077aed3SPierre ProncheryApplications should instead use L<EVP_PKEY_new(3)> and L<EVP_PKEY_free(3)>.
23*b077aed3SPierre Pronchery
24e71b7053SJung-uk KimDSA_new() allocates and initializes a B<DSA> structure. It is equivalent to
25e71b7053SJung-uk Kimcalling DSA_new_method(NULL).
26e71b7053SJung-uk Kim
27e71b7053SJung-uk KimDSA_free() frees the B<DSA> structure and its components. The values are
28e71b7053SJung-uk Kimerased before the memory is returned to the system.
29e71b7053SJung-uk KimIf B<dsa> is NULL nothing is done.
30e71b7053SJung-uk Kim
31e71b7053SJung-uk Kim=head1 RETURN VALUES
32e71b7053SJung-uk Kim
33e71b7053SJung-uk KimIf the allocation fails, DSA_new() returns B<NULL> and sets an error
34e71b7053SJung-uk Kimcode that can be obtained by
35e71b7053SJung-uk KimL<ERR_get_error(3)>. Otherwise it returns a pointer
36e71b7053SJung-uk Kimto the newly allocated structure.
37e71b7053SJung-uk Kim
38e71b7053SJung-uk KimDSA_free() returns no value.
39e71b7053SJung-uk Kim
40e71b7053SJung-uk Kim=head1 SEE ALSO
41e71b7053SJung-uk Kim
42*b077aed3SPierre ProncheryL<EVP_PKEY_new(3)>, L<EVP_PKEY_free(3)>,
43e71b7053SJung-uk KimL<DSA_new(3)>, L<ERR_get_error(3)>,
44e71b7053SJung-uk KimL<DSA_generate_parameters(3)>,
45e71b7053SJung-uk KimL<DSA_generate_key(3)>
46e71b7053SJung-uk Kim
47*b077aed3SPierre Pronchery=head1 HISTORY
48*b077aed3SPierre Pronchery
49*b077aed3SPierre ProncheryAll of these functions were deprecated in OpenSSL 3.0.
50*b077aed3SPierre Pronchery
51e71b7053SJung-uk Kim=head1 COPYRIGHT
52e71b7053SJung-uk Kim
53*b077aed3SPierre ProncheryCopyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
54e71b7053SJung-uk Kim
55*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License").  You may not use
56e71b7053SJung-uk Kimthis file except in compliance with the License.  You can obtain a copy
57e71b7053SJung-uk Kimin the file LICENSE in the source distribution or at
58e71b7053SJung-uk KimL<https://www.openssl.org/source/license.html>.
59e71b7053SJung-uk Kim
60e71b7053SJung-uk Kim=cut
61