diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-04-14 19:05:09 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2020-07-01 11:17:28 +0200 |
commit | c0bde0d2402b203207d1ec2f998e661ee0fe177c (patch) | |
tree | ad4f5ebdece8833fa7160d1051e2c614e8e88767 /src/home/homework-pkcs11.c | |
parent | user-record: securely erase pkcs#11 when assigned NULL too (diff) | |
download | systemd-c0bde0d2402b203207d1ec2f998e661ee0fe177c.tar.xz systemd-c0bde0d2402b203207d1ec2f998e661ee0fe177c.zip |
user-record: rename JSON field "pkcs11Pin" to "tokenPin"
We'd like to use it for FIDO2 tokens too, and the concept is entirely
generic, hence let's just reuse the field, but rename it. Read the old
name for compatibility, and treat the old name and the new name as
identical for most purposes.
Diffstat (limited to 'src/home/homework-pkcs11.c')
-rw-r--r-- | src/home/homework-pkcs11.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/home/homework-pkcs11.c b/src/home/homework-pkcs11.c index 915bc0e57e..3a03fb7200 100644 --- a/src/home/homework-pkcs11.c +++ b/src/home/homework-pkcs11.c @@ -62,10 +62,10 @@ int pkcs11_callback( goto decrypt; } - if (strv_isempty(data->secret->pkcs11_pin)) - return log_error_errno(SYNTHETIC_ERRNO(ENOANO), "Security Token requires PIN."); + if (strv_isempty(data->secret->token_pin)) + return log_error_errno(SYNTHETIC_ERRNO(ENOANO), "Security token requires PIN."); - STRV_FOREACH(i, data->secret->pkcs11_pin) { + STRV_FOREACH(i, data->secret->token_pin) { rv = m->C_Login(session, CKU_USER, (CK_UTF8CHAR*) *i, strlen(*i)); if (rv == CKR_OK) { log_info("Successfully logged into security token '%s' with PIN.", token_label); |