1gnutls_x509_privkey_generate(3)     gnutls     gnutls_x509_privkey_generate(3)
2
3
4

NAME

6       gnutls_x509_privkey_generate - API function
7

SYNOPSIS

9       #include <gnutls/x509.h>
10
11       int       gnutls_x509_privkey_generate(gnutls_x509_privkey_t       key,
12       gnutls_pk_algorithm_t algo, unsigned int bits, unsigned int flags);
13

ARGUMENTS

15       gnutls_x509_privkey_t key
16                   should contain a gnutls_x509_privkey_t structure
17
18       gnutls_pk_algorithm_t algo
19                   is one of the algorithms in gnutls_pk_algorithm_t.
20
21       unsigned int bits
22                   the size of the modulus
23
24       unsigned int flags
25                   unused for now.  Must be 0.
26

DESCRIPTION

28       This function will generate a random private key. Note that this  func‐
29       tion must be called on an empty private key.
30
31       Note  that when generating an elliptic curve key, the curve can be sub‐
32       stituted   in   the   place   of   the   bits   parameter   using   the
33       GNUTLS_CURVE_TO_BITS() macro.
34
35       For  DSA  keys,  if  the  subgroup size needs to be specified check the
36       GNUTLS_SUBGROUP_TO_BITS() macro.
37
38       Do    not    set    the    number     of     bits     directly,     use
39       gnutls_sec_param_to_pk_bits().
40

RETURNS

42       On  success,  GNUTLS_E_SUCCESS  (0)  is  returned, otherwise a negative
43       error value.
44

REPORTING BUGS

46       Report bugs to <bugs@gnutls.org>.
47       Home page: http://www.gnutls.org
48
49
51       Copyright © 2001-2014 Free Software Foundation, Inc..
52       Copying and distribution of this file, with  or  without  modification,
53       are  permitted  in  any  medium  without royalty provided the copyright
54       notice and this notice are preserved.
55

SEE ALSO

57       The full documentation for gnutls is maintained as  a  Texinfo  manual.
58       If  the /usr/share/doc/gnutls/ directory does not contain the HTML form
59       visit
60
61       http://www.gnutls.org/manual/
62
63gnutls                              3.3.29     gnutls_x509_privkey_generate(3)
Impressum