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