1gnutls_privkey_import_tpm_url(3) gnutls gnutls_privkey_import_tpm_url(3)
2
3
4
6 gnutls_privkey_import_tpm_url - API function
7
9 #include <gnutls/abstract.h>
10
11 int gnutls_privkey_import_tpm_url(gnutls_privkey_t pkey, const char *
12 url, const char * srk_password, const char * key_password, unsigned int
13 flags);
14
16 gnutls_privkey_t pkey
17 The private key
18
19 const char * url
20 The URL of the TPM key to be imported
21
22 const char * srk_password
23 The password for the SRK key (optional)
24
25 const char * key_password
26 A password for the key (optional)
27
28 unsigned int flags
29 One of the GNUTLS_PRIVKEY_* flags
30
32 This function will import the given private key to the abstract
33 gnutls_privkey_t type.
34
35 Note that unless GNUTLS_PRIVKEY_DISABLE_CALLBACKS is specified, if in‐
36 correct (or NULL) passwords are given the PKCS11 callback functions
37 will be used to obtain the correct passwords. Otherwise if the SRK
38 password is wrong GNUTLS_E_TPM_SRK_PASSWORD_ERROR is returned and if
39 the key password is wrong or not provided then GNUTLS_E_TPM_KEY_PASS‐
40 WORD_ERROR is returned.
41
43 On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative er‐
44 ror value.
45
47 3.1.0
48
50 Report bugs to <bugs@gnutls.org>.
51 Home page: https://www.gnutls.org
52
53
55 Copyright © 2001-2023 Free Software Foundation, Inc., and others.
56 Copying and distribution of this file, with or without modification,
57 are permitted in any medium without royalty provided the copyright no‐
58 tice and this notice are preserved.
59
61 The full documentation for gnutls is maintained as a Texinfo manual.
62 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
63 visit
64
65 https://www.gnutls.org/manual/
66
67gnutls 3.8.2 gnutls_privkey_import_tpm_url(3)