1
2
3
4
5@deftypefun {int} {gnutls_pkcs11_token_set_pin} (const char * @var{token_url}, const char * @var{oldpin}, const char * @var{newpin}, unsigned int @var{flags})
6@var{token_url}: A PKCS @code{11}  URL specifying a token
7
8@var{oldpin}: old user's PIN
9
10@var{newpin}: new user's PIN
11
12@var{flags}: one of @code{gnutls_pin_flag_t} .
13
14This function will modify or set a user or administrator's PIN for
15the given token.  If it is called to set a PIN for first time
16the oldpin must be @code{NULL} . When setting the admin's PIN with the
17@code{GNUTLS_PIN_SO}  flag, the  @code{oldpin} value must be provided (this requirement
18is relaxed after GnuTLS 3.6.5 since which the PIN will be requested if missing).
19
20@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS}  (0) is returned, otherwise a
21negative error value.
22@end deftypefun
23