Tizen 2.0 Release
[external/libgnutls26.git] / doc / manpages / gnutls_x509_privkey_generate.3
1 .\" DO NOT MODIFY THIS FILE!  It was generated by gdoc.
2 .TH "gnutls_x509_privkey_generate" 3 "2.12.6.1" "gnutls" "gnutls"
3 .SH NAME
4 gnutls_x509_privkey_generate \- API function
5 .SH SYNOPSIS
6 .B #include <gnutls/x509.h>
7 .sp
8 .BI "int gnutls_x509_privkey_generate(gnutls_x509_privkey_t " key ", gnutls_pk_algorithm_t " algo ", unsigned int " bits ", unsigned int " flags ");"
9 .SH ARGUMENTS
10 .IP "gnutls_x509_privkey_t key" 12
11 should contain a \fBgnutls_x509_privkey_t\fP structure
12 .IP "gnutls_pk_algorithm_t algo" 12
13 is one of RSA or DSA.
14 .IP "unsigned int bits" 12
15 the size of the modulus
16 .IP "unsigned int flags" 12
17 unused for now.  Must be 0.
18 .SH "DESCRIPTION"
19 This function will generate a random private key. Note that this
20 function must be called on an empty private key.
21
22 Do not set the number of bits directly, use \fBgnutls_sec_param_to_pk_bits()\fP.
23 .SH "RETURNS"
24 On success, \fBGNUTLS_E_SUCCESS\fP is returned, otherwise a
25 negative error value.
26 .SH "REPORTING BUGS"
27 Report bugs to <bug-gnutls@gnu.org>.
28 GnuTLS home page: http://www.gnu.org/software/gnutls/
29 General help using GNU software: http://www.gnu.org/gethelp/
30 .SH COPYRIGHT
31 Copyright \(co 2008 Free Software Foundation.
32 .br
33 Copying and distribution of this file, with or without modification,
34 are permitted in any medium without royalty provided the copyright
35 notice and this notice are preserved.
36 .SH "SEE ALSO"
37 The full documentation for
38 .B gnutls
39 is maintained as a Texinfo manual.  If the
40 .B info
41 and
42 .B gnutls
43 programs are properly installed at your site, the command
44 .IP
45 .B info gnutls
46 .PP
47 should give you access to the complete manual.