| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
@deftypefun {int} {gnutls_tpm_privkey_generate} (gnutls_pk_algorithm_t @var{pk}, unsigned int @var{bits}, const char * @var{srk_password}, const char * @var{key_password}, gnutls_tpmkey_fmt_t @var{format}, gnutls_x509_crt_fmt_t @var{pub_format}, gnutls_datum_t * @var{privkey}, gnutls_datum_t * @var{pubkey}, unsigned int @var{flags}) |
| 6 |
@var{pk}: the public key algorithm |
| 7 |
|
| 8 |
@var{bits}: the security bits |
| 9 |
|
| 10 |
@var{srk_password}: a password to protect the exported key (optional) |
| 11 |
|
| 12 |
@var{key_password}: the password for the TPM (optional) |
| 13 |
|
| 14 |
@var{format}: the format of the private key |
| 15 |
|
| 16 |
@var{pub_format}: the format of the public key |
| 17 |
|
| 18 |
@var{privkey}: the generated key |
| 19 |
|
| 20 |
@var{pubkey}: the corresponding public key (may be null) |
| 21 |
|
| 22 |
@var{flags}: should be a list of GNUTLS_TPM_* flags |
| 23 |
|
| 24 |
This function will generate a private key in the TPM |
| 25 |
chip. The private key will be generated within the chip |
| 26 |
and will be exported in a wrapped with TPM's master key |
| 27 |
form. Furthermore the wrapped key can be protected with |
| 28 |
the provided @code{password} . |
| 29 |
|
| 30 |
Note that bits in TPM is quantized value. If the input value |
| 31 |
is not one of the allowed values, then it will be quantized to |
| 32 |
one of 512, 1024, 2048, 4096, 8192 and 16384. |
| 33 |
|
| 34 |
Allowed flags are: |
| 35 |
|
| 36 |
@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise a |
| 37 |
negative error value. |
| 38 |
|
| 39 |
@strong{Since:} 3.1.0 |
| 40 |
@end deftypefun |