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