Blame doc/functions/gnutls_pkcs11_privkey_generate2

Packit aea12f
Packit aea12f
Packit aea12f
Packit aea12f
Packit aea12f
@deftypefun {int} {gnutls_pkcs11_privkey_generate2} (const char * @var{url}, gnutls_pk_algorithm_t @var{pk}, unsigned int @var{bits}, const char * @var{label}, gnutls_x509_crt_fmt_t @var{fmt}, gnutls_datum_t * @var{pubkey}, unsigned int @var{flags})
Packit aea12f
@var{url}: a token URL
Packit aea12f
Packit aea12f
@var{pk}: the public key algorithm
Packit aea12f
Packit aea12f
@var{bits}: the security bits
Packit aea12f
Packit aea12f
@var{label}: a label
Packit aea12f
Packit aea12f
@var{fmt}: the format of output params. PEM or DER
Packit aea12f
Packit aea12f
@var{pubkey}: will hold the public key (may be @code{NULL} )
Packit aea12f
Packit aea12f
@var{flags}: zero or an OR'ed sequence of @code{GNUTLS_PKCS11_OBJ_FLAGs} 
Packit aea12f
Packit aea12f
This function will generate a private key in the specified
Packit aea12f
by the  @code{url} token. The private key will be generate within
Packit aea12f
the token and will not be exportable. This function will
Packit aea12f
store the DER-encoded public key in the SubjectPublicKeyInfo format
Packit aea12f
in  @code{pubkey} . The  @code{pubkey} should be deinitialized using @code{gnutls_free()} .
Packit aea12f
Packit aea12f
Note that when generating an elliptic curve key, the curve
Packit aea12f
can be substituted in the place of the bits parameter using the
Packit aea12f
@code{GNUTLS_CURVE_TO_BITS()}  macro.
Packit aea12f
Packit aea12f
@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS}  (0) is returned, otherwise a
Packit aea12f
negative error value.
Packit aea12f
Packit aea12f
@strong{Since:} 3.1.5
Packit aea12f
@end deftypefun