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 11e71b7053SJung-uk Kim int DSA_generate_key(DSA *a); 12e71b7053SJung-uk Kim 13e71b7053SJung-uk Kim=head1 DESCRIPTION 14e71b7053SJung-uk Kim 15e71b7053SJung-uk KimDSA_generate_key() expects B<a> to contain DSA parameters. It generates 16e71b7053SJung-uk Kima new key pair and stores it in B<a-E<gt>pub_key> and B<a-E<gt>priv_key>. 17e71b7053SJung-uk Kim 18*da327cd2SJung-uk KimThe random generator must be seeded prior to calling DSA_generate_key(). 19*da327cd2SJung-uk KimIf the automatic seeding or reseeding of the OpenSSL CSPRNG fails due to 20*da327cd2SJung-uk Kimexternal circumstances (see L<RAND(7)>), the operation will fail. 21e71b7053SJung-uk Kim 22e71b7053SJung-uk Kim=head1 RETURN VALUES 23e71b7053SJung-uk Kim 24e71b7053SJung-uk KimDSA_generate_key() returns 1 on success, 0 otherwise. 25e71b7053SJung-uk KimThe error codes can be obtained by L<ERR_get_error(3)>. 26e71b7053SJung-uk Kim 27e71b7053SJung-uk Kim=head1 SEE ALSO 28e71b7053SJung-uk Kim 29e71b7053SJung-uk KimL<DSA_new(3)>, L<ERR_get_error(3)>, L<RAND_bytes(3)>, 30e71b7053SJung-uk KimL<DSA_generate_parameters_ex(3)> 31e71b7053SJung-uk Kim 32e71b7053SJung-uk Kim=head1 COPYRIGHT 33e71b7053SJung-uk Kim 34*da327cd2SJung-uk KimCopyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved. 35e71b7053SJung-uk Kim 36e71b7053SJung-uk KimLicensed under the OpenSSL license (the "License"). You may not use 37e71b7053SJung-uk Kimthis file except in compliance with the License. You can obtain a copy 38e71b7053SJung-uk Kimin the file LICENSE in the source distribution or at 39e71b7053SJung-uk KimL<https://www.openssl.org/source/license.html>. 40e71b7053SJung-uk Kim 41e71b7053SJung-uk Kim=cut 42