]> git.ipfire.org Git - thirdparty/systemd.git/commit
p11kit: check the flags associated with the slot instead of flags associated with...
authorWarren <git@icouldbedeadwrong.net>
Tue, 15 Aug 2023 10:28:14 +0000 (20:28 +1000)
committerGitHub <noreply@github.com>
Tue, 15 Aug 2023 10:28:14 +0000 (11:28 +0100)
commit5007942477ecfb69702f542cb6770ea4b5bc1e57
tree5d1c6fd2958a3c81e0791eb11cb027d73ea2e333
parent4ccee4b4265f564b635386b2546bb78fb1d6733b
p11kit: check the flags associated with the slot instead of flags associated with the token

The logic around checking PKCS11 tokens (used by systemd-cryptenroll) contains a bug.
The code is checking the flags field of a pkcs11 token_info structure against a set of flags defined for the pkcs11 slot_info structure. This PR changes the check so that the correct structure's flag field is being checked.
(Reference to the PKCS#11 spec:http://docs.oasis-open.org/pkcs11/pkcs11-base/v2.40/os/pkcs11-base-v2.40-os.html, section CK_SLOT_INFO).
src/shared/pkcs11-util.c