diff --git a/lib/libcryptsetup.h b/lib/libcryptsetup.h index be36aa26..c1b3d5c5 100644 --- a/lib/libcryptsetup.h +++ b/lib/libcryptsetup.h @@ -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, diff --git a/lib/libcryptsetup.sym b/lib/libcryptsetup.sym index 92736ced..f0668e36 100644 --- a/lib/libcryptsetup.sym +++ b/lib/libcryptsetup.sym @@ -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; }; diff --git a/lib/setup.c b/lib/setup.c index 52c7a92a..b139d59b 100644 --- a/lib/setup.c +++ b/lib/setup.c @@ -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) diff --git a/src/cryptsetup.c b/src/cryptsetup.c index 6c4a587b..ff45f8f0 100644 --- a/src/cryptsetup.c +++ b/src/cryptsetup.c @@ -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); }