Remove logging from keyring utilities.

Reduce bloated code in low level keyring utilities code.
Move log messages higher the library code.

Also return -ENOTSUP when code was compiled out by configure
option.
This commit is contained in:
Ondrej Kozina
2017-12-21 16:52:39 +01:00
committed by Milan Broz
parent cc76f3746f
commit 5f5ffcd48a
4 changed files with 45 additions and 113 deletions

View File

@@ -41,8 +41,7 @@ static int keyring_open(struct crypt_device *cd,
json_object_object_get_ex(jobj_token, "key_description", &jobj_key);
/* TODO: if r == -ENOKEY then instantiate the key? */
if (keyring_get_passphrase(json_object_get_string(jobj_key), buffer, buffer_len))
if (crypt_get_passphrase_from_keyring(json_object_get_string(jobj_key), buffer, buffer_len))
return -EINVAL;
return 0;