Add pin size parameter in crypt_active_by_pin_token.

Well, after all it really should have supported binary data
of arbitrary length.
This commit is contained in:
Ondrej Kozina
2021-03-11 18:15:18 +01:00
parent d4cd675f33
commit 5d0a11a21b
6 changed files with 22 additions and 12 deletions

View File

@@ -221,7 +221,8 @@ static int sshplugin_public_key_auth(struct crypt_device *cd, ssh_session ssh, c
}
int cryptsetup_token_open_pin(struct crypt_device *cd, int token, const char *pin,
char **password, size_t *password_len, void *usrptr __attribute__((unused)))
size_t pin_size __attribute__((unused)), char **password, size_t *password_len,
void *usrptr __attribute__((unused)))
{
int r;
json_object *jobj_server, *jobj_user, *jobj_path, *jobj_token, *jobj_keypath;
@@ -267,7 +268,7 @@ int cryptsetup_token_open_pin(struct crypt_device *cd, int token, const char *pi
int cryptsetup_token_open(struct crypt_device *cd, int token,
char **password, size_t *password_len, void *usrptr)
{
return cryptsetup_token_open_pin(cd, token, NULL, password, password_len, usrptr);
return cryptsetup_token_open_pin(cd, token, NULL, 0, password, password_len, usrptr);
}
void cryptsetup_token_dump(struct crypt_device *cd, const char *json)