1*2175Sjp161948=pod 2*2175Sjp161948 3*2175Sjp161948=head1 NAME 4*2175Sjp161948 5*2175Sjp161948DSA_generate_key - generate DSA key pair 6*2175Sjp161948 7*2175Sjp161948=head1 SYNOPSIS 8*2175Sjp161948 9*2175Sjp161948 #include <openssl/dsa.h> 10*2175Sjp161948 11*2175Sjp161948 int DSA_generate_key(DSA *a); 12*2175Sjp161948 13*2175Sjp161948=head1 DESCRIPTION 14*2175Sjp161948 15*2175Sjp161948DSA_generate_key() expects B<a> to contain DSA parameters. It generates 16*2175Sjp161948a new key pair and stores it in B<a-E<gt>pub_key> and B<a-E<gt>priv_key>. 17*2175Sjp161948 18*2175Sjp161948The PRNG must be seeded prior to calling DSA_generate_key(). 19*2175Sjp161948 20*2175Sjp161948=head1 RETURN VALUE 21*2175Sjp161948 22*2175Sjp161948DSA_generate_key() returns 1 on success, 0 otherwise. 23*2175Sjp161948The error codes can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>. 24*2175Sjp161948 25*2175Sjp161948=head1 SEE ALSO 26*2175Sjp161948 27*2175Sjp161948L<dsa(3)|dsa(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<rand(3)|rand(3)>, 28*2175Sjp161948L<DSA_generate_parameters(3)|DSA_generate_parameters(3)> 29*2175Sjp161948 30*2175Sjp161948=head1 HISTORY 31*2175Sjp161948 32*2175Sjp161948DSA_generate_key() is available since SSLeay 0.8. 33*2175Sjp161948 34*2175Sjp161948=cut 35