mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-15 04:40:05 +01:00
Rename PIN enable token activation API function.
This commit is contained in:
@@ -2275,7 +2275,7 @@ int crypt_token_register(const crypt_token_handler *handler);
|
||||
* @return unlocked key slot number or negative errno otherwise.
|
||||
*
|
||||
* @note EAGAIN errno means that token is PIN protected and you should call
|
||||
* @link crypt_activate_by_pin_token @endlink with PIN
|
||||
* @link crypt_activate_by_token_pin @endlink with PIN
|
||||
*/
|
||||
int crypt_activate_by_token(struct crypt_device *cd,
|
||||
const char *name,
|
||||
@@ -2296,7 +2296,7 @@ int crypt_activate_by_token(struct crypt_device *cd,
|
||||
* @return unlocked key slot number or negative errno otherwise.
|
||||
*
|
||||
* @note EAGAIN errno means that token is PIN protected and you should call
|
||||
* @link crypt_activate_by_pin_token @endlink with PIN
|
||||
* @link crypt_activate_by_token_pin @endlink with PIN
|
||||
*/
|
||||
int crypt_activate_by_token_type(struct crypt_device *cd,
|
||||
const char *name,
|
||||
@@ -2319,7 +2319,7 @@ int crypt_activate_by_token_type(struct crypt_device *cd,
|
||||
*
|
||||
* @return unlocked key slot number or negative errno otherwise.
|
||||
*/
|
||||
int crypt_activate_by_pin_token(struct crypt_device *cd,
|
||||
int crypt_activate_by_token_pin(struct crypt_device *cd,
|
||||
const char *name,
|
||||
const char *type,
|
||||
int token,
|
||||
|
||||
@@ -5,7 +5,7 @@ CRYPTSETUP_2.4 {
|
||||
crypt_header_is_detached;
|
||||
crypt_logf;
|
||||
crypt_activate_by_token_type;
|
||||
crypt_activate_by_pin_token;
|
||||
crypt_activate_by_token_pin;
|
||||
crypt_dump_json;
|
||||
};
|
||||
|
||||
|
||||
@@ -5595,7 +5595,7 @@ void crypt_set_luks2_reencrypt(struct crypt_device *cd, struct luks2_reencrypt *
|
||||
/*
|
||||
* Token handling
|
||||
*/
|
||||
int crypt_activate_by_pin_token(struct crypt_device *cd, const char *name,
|
||||
int crypt_activate_by_token_pin(struct crypt_device *cd, const char *name,
|
||||
const char *type, int token, const char *pin, size_t pin_size,
|
||||
void *usrptr, uint32_t flags)
|
||||
{
|
||||
@@ -5623,14 +5623,14 @@ int crypt_activate_by_pin_token(struct crypt_device *cd, const char *name,
|
||||
int crypt_activate_by_token(struct crypt_device *cd,
|
||||
const char *name, int token, void *usrptr, uint32_t flags)
|
||||
{
|
||||
return crypt_activate_by_pin_token(cd, name, NULL, token, NULL, 0, usrptr, flags);
|
||||
return crypt_activate_by_token_pin(cd, name, NULL, token, NULL, 0, usrptr, flags);
|
||||
}
|
||||
|
||||
int crypt_activate_by_token_type(struct crypt_device *cd,
|
||||
const char *name, const char *type, int token,
|
||||
void *usrptr, uint32_t flags)
|
||||
{
|
||||
return crypt_activate_by_pin_token(cd, name, type, token, NULL, 0, usrptr, flags);
|
||||
return crypt_activate_by_token_pin(cd, name, type, token, NULL, 0, usrptr, flags);
|
||||
}
|
||||
|
||||
int crypt_token_json_get(struct crypt_device *cd, int token, const char **json)
|
||||
|
||||
@@ -1541,7 +1541,7 @@ static int action_open_luks(void)
|
||||
ARG_UINT32(OPT_TIMEOUT_ID), _verify_passphrase(0), 0, cd);
|
||||
if (r < 0)
|
||||
goto out;
|
||||
r = crypt_activate_by_pin_token(cd, activated_name, NULL, ARG_INT32(OPT_TOKEN_ID_ID),
|
||||
r = crypt_activate_by_token_pin(cd, activated_name, NULL, ARG_INT32(OPT_TOKEN_ID_ID),
|
||||
password, passwordLen, NULL, activate_flags);
|
||||
tools_keyslot_msg(r, UNLOCKED);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user