summaryrefslogtreecommitdiffstats
path: root/src/shared/pkcs11-util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2024-02-19 17:44:01 +0100
committerLennart Poettering <lennart@poettering.net>2024-02-20 16:50:00 +0100
commita96c284f10dd28ebad99d52bd72e00f3cb93bfaa (patch)
tree127b5113eb4f45afe7ed412a7362d734862d8cdf /src/shared/pkcs11-util.h
parentcryptenroll: use a different credential for new new PIN (diff)
downloadsystemd-a96c284f10dd28ebad99d52bd72e00f3cb93bfaa.tar.xz
systemd-a96c284f10dd28ebad99d52bd72e00f3cb93bfaa.zip
pkcs11-util: clean up credential handling for PKCS11 PIN
similar as the previous commit, let's clean up the credential name we use. Use home.token-pin in case of homectl, and cryptenroll.pkcs11-pin in case of cryptenroll.
Diffstat (limited to '')
-rw-r--r--src/shared/pkcs11-util.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shared/pkcs11-util.h b/src/shared/pkcs11-util.h
index 838f90b6c1..9b4336dc05 100644
--- a/src/shared/pkcs11-util.h
+++ b/src/shared/pkcs11-util.h
@@ -71,7 +71,7 @@ typedef int (*pkcs11_find_token_callback_t)(CK_FUNCTION_LIST *m, CK_SESSION_HAND
int pkcs11_find_token(const char *pkcs11_uri, pkcs11_find_token_callback_t callback, void *userdata);
#if HAVE_OPENSSL
-int pkcs11_acquire_public_key(const char *uri, const char *askpw_friendly_name, const char *askpw_icon_name, EVP_PKEY **ret_pkey, char **ret_pin_used);
+int pkcs11_acquire_public_key(const char *uri, const char *askpw_friendly_name, const char *askpw_icon, const char *askpw_credential, EVP_PKEY **ret_pkey, char **ret_pin_used);
#endif
typedef struct {
@@ -83,6 +83,7 @@ typedef struct {
size_t decrypted_key_size;
bool free_encrypted_key;
bool headless;
+ const char *askpw_credential;
AskPasswordFlags askpw_flags;
} pkcs11_crypt_device_callback_data;