-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sergio Arroutbi <[email protected]> Co-authored-by: Sergio Correia <[email protected]>
- Loading branch information
1 parent
a4dd9dd
commit 8527d5e
Showing
22 changed files
with
1,378 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,18 @@ | ||
#!/bin/sh | ||
# | ||
# 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/>. | ||
# | ||
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,41 @@ | ||
#!/bin/bash | ||
# vim: set tabstop=8 shiftwidth=4 softtabstop=4 expandtab smarttab colorcolumn=80: | ||
# | ||
# 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
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,4 @@ | ||
#!/bin/bash | ||
/usr/libexec/clevis-luks-pkcs11-askpin & | ||
# Wait 30 seconds to attend keys. If control socket receives information, this time is cancelled | ||
clevis-pkcs11-afunix-socket-unlock -f /run/systemd/clevis-pkcs11.sock -s 30 |
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,8 @@ | ||
[Unit] | ||
Description=Unencrypt through PKCS11 | ||
DefaultDependencies=no | ||
PartOf=clevis-luks-pkcs11-askpass.socket | ||
|
||
[Service] | ||
Type=simple | ||
ExecStart=/usr/libexec/clevis-luks-pkcs11-askpass |
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,11 @@ | ||
# clevis pkcs11 socket | ||
[Unit] | ||
Description=Clevis PKCS11 socket handler | ||
Requires=clevis-luks-pkcs11-askpass.service | ||
After=cryptsetup-pre.target sockets.target systemd-ask-password-wall.service | ||
|
||
[Socket] | ||
ListenDatagram=/run/systemd/clevis-pkcs11.sock | ||
|
||
[Install] | ||
WantedBy=cryptsetup-pre.target sockets.target systemd-ask-password-wall.service |
Oops, something went wrong.