blob: efa0c0bd2b0cad736bad7e891ba205c32001d4f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
@deftypefun {int} {gnutls_pkcs11_copy_x509_privkey2} (const char * @var{token_url}, gnutls_x509_privkey_t @var{key}, const char * @var{label}, const gnutls_datum_t * @var{cid}, unsigned int @var{key_usage}, unsigned int @var{flags})
@var{token_url}: A PKCS @code{11} URL specifying a token
@var{key}: A private key
@var{label}: A name to be used for the stored data
@var{cid}: The CKA_ID to set for the object -if NULL, the ID will be derived from the public key
@var{key_usage}: One of GNUTLS_KEY_*
@var{flags}: One of GNUTLS_PKCS11_OBJ_* flags
This function will copy a private key into a PKCS @code{11} token specified by
a URL.
Since 3.6.3 the objects are marked as sensitive by default unless
@code{GNUTLS_PKCS11_OBJ_FLAG_MARK_NOT_SENSITIVE} is specified.
@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise a
negative error value.
@strong{Since:} 3.4.0
@end deftypefun
|