



@deftypefun {int} {gnutls_privkey_import_tpm_url} (gnutls_privkey_t @var{pkey}, const char * @var{url}, const char * @var{srk_password}, const char * @var{key_password}, unsigned int @var{flags})
@var{pkey}: The private key

@var{url}: The URL of the TPM key to be imported

@var{srk_password}: The password for the SRK key (optional)

@var{key_password}: A password for the key (optional)

@var{flags}: One of the GNUTLS_PRIVKEY_* flags

This function will import the given private key to the abstract
@code{gnutls_privkey_t}  structure.

Note that unless @code{GNUTLS_PRIVKEY_DISABLE_CALLBACKS} 
is specified, if incorrect (or NULL) passwords are given
the PKCS11 callback functions will be used to obtain the
correct passwords. Otherwise if the SRK password is wrong
@code{GNUTLS_E_TPM_SRK_PASSWORD_ERROR}  is returned and if the key password
is wrong or not provided then @code{GNUTLS_E_TPM_KEY_PASSWORD_ERROR} 
is returned. 

@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS}  (0) is returned, otherwise a
negative error value.

@strong{Since:} 3.1.0
@end deftypefun
