1e71b7053SJung-uk Kim=pod 2e71b7053SJung-uk Kim 3e71b7053SJung-uk Kim=head1 NAME 4e71b7053SJung-uk Kim 5e71b7053SJung-uk KimDSA_generate_key - generate DSA key pair 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 int DSA_generate_key(DSA *a); 16e71b7053SJung-uk Kim 17e71b7053SJung-uk Kim=head1 DESCRIPTION 18e71b7053SJung-uk Kim 19*b077aed3SPierre ProncheryAll of the functions described on this page are deprecated. 20*b077aed3SPierre ProncheryApplications should instead use L<EVP_PKEY_keygen_init(3)> and 21*b077aed3SPierre ProncheryL<EVP_PKEY_keygen(3)> as described in L<EVP_PKEY-DSA(7)>. 22*b077aed3SPierre Pronchery 23e71b7053SJung-uk KimDSA_generate_key() expects B<a> to contain DSA parameters. It generates 24e71b7053SJung-uk Kima new key pair and stores it in B<a-E<gt>pub_key> and B<a-E<gt>priv_key>. 25e71b7053SJung-uk Kim 26da327cd2SJung-uk KimThe random generator must be seeded prior to calling DSA_generate_key(). 27da327cd2SJung-uk KimIf the automatic seeding or reseeding of the OpenSSL CSPRNG fails due to 28da327cd2SJung-uk Kimexternal circumstances (see L<RAND(7)>), the operation will fail. 29e71b7053SJung-uk Kim 30e71b7053SJung-uk Kim=head1 RETURN VALUES 31e71b7053SJung-uk Kim 32e71b7053SJung-uk KimDSA_generate_key() returns 1 on success, 0 otherwise. 33e71b7053SJung-uk KimThe error codes can be obtained by L<ERR_get_error(3)>. 34e71b7053SJung-uk Kim 35e71b7053SJung-uk Kim=head1 SEE ALSO 36e71b7053SJung-uk Kim 37e71b7053SJung-uk KimL<DSA_new(3)>, L<ERR_get_error(3)>, L<RAND_bytes(3)>, 38e71b7053SJung-uk KimL<DSA_generate_parameters_ex(3)> 39e71b7053SJung-uk Kim 40*b077aed3SPierre Pronchery=head1 HISTORY 41*b077aed3SPierre Pronchery 42*b077aed3SPierre ProncheryThis function was deprecated in OpenSSL 3.0. 43*b077aed3SPierre Pronchery 44e71b7053SJung-uk Kim=head1 COPYRIGHT 45e71b7053SJung-uk Kim 46*b077aed3SPierre ProncheryCopyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved. 47e71b7053SJung-uk Kim 48*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License"). You may not use 49e71b7053SJung-uk Kimthis file except in compliance with the License. You can obtain a copy 50e71b7053SJung-uk Kimin the file LICENSE in the source distribution or at 51e71b7053SJung-uk KimL<https://www.openssl.org/source/license.html>. 52e71b7053SJung-uk Kim 53e71b7053SJung-uk Kim=cut 54