Remove redundant (unreleased) API for token based activation.

Reverts commit 96d83455ca partially. It is not necessary to
have specific crypt_activate_by_token_type call. Users
may use crypt_activate_by_token_pin with pin argument set to NULL
and achieve same goal as with crypt_activate_by_token_type.
This commit is contained in:
Ondrej Kozina
2021-05-21 15:55:15 +02:00
committed by Milan Broz
parent ca2e93b69d
commit df7a995fa2
3 changed files with 0 additions and 36 deletions

View File

@@ -2311,34 +2311,6 @@ int crypt_activate_by_token(struct crypt_device *cd,
void *usrptr,
uint32_t flags);
/**
* Activate device or check key using specific token type.
*
* @param cd crypt device handle
* @param name name of device to create, if @e NULL only check token
* @param type restrict type of token, if @e NULL all types are allowed
* @param token requested token to check or CRYPT_ANY_TOKEN to check all
* @param usrptr provided identification in callback
* @param flags activation flags
*
* @return unlocked key slot number or negative errno otherwise.
*
* @note EPERM errno means token provided passphrase successfully, but
* passphrase did not unlock any keyslot associated with the token.
*
* @note ENOENT errno means no token of given type (or subsequently assigned keyslot)
* was eligible to unlock device.
*
* @note EAGAIN errno means that token is PIN protected and you should call
* @link crypt_activate_by_token_pin @endlink with PIN
*/
int crypt_activate_by_token_type(struct crypt_device *cd,
const char *name,
const char *type,
int token,
void *usrptr,
uint32_t flags);
/**
* Activate device or check key using a token with PIN.
*

View File

@@ -138,7 +138,6 @@ CRYPTSETUP_2.4 {
crypt_token_max;
crypt_header_is_detached;
crypt_logf;
crypt_activate_by_token_type;
crypt_activate_by_token_pin;
crypt_dump_json;
crypt_format;

View File

@@ -5699,13 +5699,6 @@ int crypt_activate_by_token(struct crypt_device *cd,
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_token_pin(cd, name, type, token, NULL, 0, usrptr, flags);
}
int crypt_token_json_get(struct crypt_device *cd, int token, const char **json)
{
int r;