1gnutls_pkcs11_privkey_generate3(3)  gnutls  gnutls_pkcs11_privkey_generate3(3)
2
3
4

NAME

6       gnutls_pkcs11_privkey_generate3 - API function
7

SYNOPSIS

9       #include <gnutls/pkcs11.h>
10
11       int  gnutls_pkcs11_privkey_generate3(const  char * url, gnutls_pk_algo‐
12       rithm_t pk, unsigned int bits, const char * label, const gnutls_datum_t
13       * cid, gnutls_x509_crt_fmt_t fmt, gnutls_datum_t * pubkey, unsigned int
14       flags);
15

ARGUMENTS

17       const char * url
18                   a token URL
19
20       gnutls_pk_algorithm_t pk
21                   the public key algorithm
22
23       unsigned int bits
24                   the security bits
25
26       const char * label
27                   a label
28
29       const gnutls_datum_t * cid
30                   The CKA_ID to use for the new object
31
32       gnutls_x509_crt_fmt_t fmt
33                   the format of output params. PEM or DER
34
35       gnutls_datum_t * pubkey
36                   will hold the public key (may be NULL)
37
38       unsigned int flags
39                   zero or an OR'ed sequence of GNUTLS_PKCS11_OBJ_FLAGs
40

DESCRIPTION

42       This function will generate a private key in the specified by the   url
43       token.  The  private key will be generate within the token and will not
44       be exportable. This function will store the DER-encoded public  key  in
45       the  SubjectPublicKeyInfo  format  in   pubkey  . The  pubkey should be
46       deinitialized using gnutls_free().
47
48       Note that when generating an elliptic curve key, the curve can be  sub‐
49       stituted   in   the   place   of   the   bits   parameter   using   the
50       GNUTLS_CURVE_TO_BITS() macro.
51

RETURNS

53       On success, GNUTLS_E_SUCCESS (0)  is  returned,  otherwise  a  negative
54       error value.
55

SINCE

57       3.3.26
58

REPORTING BUGS

60       Report bugs to <bugs@gnutls.org>.
61       Home page: http://www.gnutls.org
62
63
65       Copyright © 2001-2014 Free Software Foundation, Inc..
66       Copying  and  distribution  of this file, with or without modification,
67       are permitted in any medium  without  royalty  provided  the  copyright
68       notice and this notice are preserved.
69

SEE ALSO

71       The  full  documentation  for gnutls is maintained as a Texinfo manual.
72       If the /usr/share/doc/gnutls/ directory does not contain the HTML  form
73       visit
74
75       http://www.gnutls.org/manual/
76
77gnutls                              3.3.29  gnutls_pkcs11_privkey_generate3(3)
Impressum