mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-06 00:10:04 +01:00
Add keyring keyslot_context.
This commit is contained in:
@@ -1262,6 +1262,21 @@ int crypt_keyslot_context_init_by_volume_key(struct crypt_device *cd,
|
||||
size_t volume_key_size,
|
||||
struct crypt_keyslot_context **kc);
|
||||
|
||||
/**
|
||||
* Initialize keyslot context via passphrase stored in a keyring.
|
||||
*
|
||||
* @param cd crypt device handle initialized to LUKS device context
|
||||
*
|
||||
* @param key_description kernel keyring key description library should look
|
||||
* for passphrase in
|
||||
* @param kc returns crypt keyslot context handle type CRYPT_KC_TYPE_KEYRING
|
||||
*
|
||||
* @return zero on success or negative errno otherwise.
|
||||
*/
|
||||
int crypt_keyslot_context_init_by_keyring(struct crypt_device *cd,
|
||||
const char *key_description,
|
||||
struct crypt_keyslot_context **kc);
|
||||
|
||||
/**
|
||||
* Get error code per keyslot context from last failed call.
|
||||
*
|
||||
@@ -1305,6 +1320,10 @@ int crypt_keyslot_context_set_pin(struct crypt_device *cd,
|
||||
#define CRYPT_KC_TYPE_TOKEN INT16_C(3)
|
||||
/** keyslot context initialized by volume key or unbound key (@link crypt_keyslot_context_init_by_volume_key @endlink) */
|
||||
#define CRYPT_KC_TYPE_KEY INT16_C(4)
|
||||
/** keyslot context initialized by description of a keyring key
|
||||
* (@link crypt_keyslot_context_init_by_keyring @endlink)
|
||||
*/
|
||||
#define CRYPT_KC_TYPE_KEYRING INT16_C(5)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user