-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introducing new PKCS#11 pin that allows disk unlocking with PKCS#11 devices. For extended information on installation and configuration, check README.md Signed-off-by: Sergio Arroutbi <[email protected]> Co-authored-by: Sergio Correia <[email protected]>
- Loading branch information
1 parent
a4dd9dd
commit 5e9a728
Showing
22 changed files
with
1,689 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
# | ||
# Copyright (c) 2024 Red Hat, Inc. | ||
# Author: Sergio Arroutbi <[email protected]> | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
pcscd --disable-polkit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
dracut = dependency('dracut', required: false) | ||
|
||
if dracut.found() | ||
dracutdir = dracut.get_pkgconfig_variable('dracutmodulesdir') + '/60' + meson.project_name() + '-pin-pkcs11' | ||
|
||
configure_file( | ||
input: 'module-setup.sh.in', | ||
output: 'module-setup.sh', | ||
install_dir: dracutdir, | ||
configuration: data, | ||
) | ||
|
||
# TODO: install hook for pcscd start | ||
install_data('clevis-pkcs11-hook.sh', install_dir: dracutdir) | ||
|
||
else | ||
warning('Will not install dracut module clevis-pin-pkcs11 due to missing dependencies!') | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright (c) 2024 Red Hat, Inc. | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
# shellcheck disable=SC2154 | ||
# | ||
depends() { | ||
echo clevis | ||
return 255 | ||
} | ||
|
||
install() { | ||
inst_hook initqueue/online 60 "${moddir}/clevis-pkcs11-hook.sh" | ||
inst_hook initqueue/settled 60 "${moddir}/clevis-pkcs11-hook.sh" | ||
|
||
inst_multiple \ | ||
pcscd \ | ||
/usr/lib64/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so \ | ||
/usr/lib64/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist \ | ||
/usr/lib64/libykcs11.so.2 \ | ||
/usr/lib64/opensc-pkcs11.so \ | ||
/usr/lib64/pkcs11/opensc-pkcs11.so \ | ||
pkcs11-tool \ | ||
clevis-decrypt-pkcs11 | ||
|
||
dracut_need_initqueue | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.