summaryrefslogtreecommitdiff
path: root/op-mode-definitions
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-09-16 17:33:10 +0200
committerGitHub <noreply@github.com>2024-09-16 17:33:10 +0200
commit53fa5c9e93a45e2f8c78adf69652bc2f875cef53 (patch)
treee49d7d635809da09df83898e720f9b053e2dfb11 /op-mode-definitions
parent27e2016952f8fdd01d59f73c67ac9b8a30b756b6 (diff)
parent07c4fe9ba4511f06bdd302cf37b3059ea86df8c6 (diff)
downloadvyos-1x-53fa5c9e93a45e2f8c78adf69652bc2f875cef53.tar.gz
vyos-1x-53fa5c9e93a45e2f8c78adf69652bc2f875cef53.zip
Merge pull request #4020 from c-po/secure-boot
T861: op-mode: initial parts for UEFI secure boot CLI
Diffstat (limited to 'op-mode-definitions')
-rw-r--r--op-mode-definitions/install-mok.xml.in13
-rw-r--r--op-mode-definitions/show-secure-boot.xml.in21
2 files changed, 34 insertions, 0 deletions
diff --git a/op-mode-definitions/install-mok.xml.in b/op-mode-definitions/install-mok.xml.in
new file mode 100644
index 000000000..18526a354
--- /dev/null
+++ b/op-mode-definitions/install-mok.xml.in
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interfaceDefinition>
+ <node name="install">
+ <children>
+ <leafNode name="mok">
+ <properties>
+ <help>Install Secure Boot MOK (Machine Owner Key)</help>
+ </properties>
+ <command>if test -f /var/lib/shim-signed/mok/MOK.der; then sudo mokutil --ignore-keyring --import /var/lib/shim-signed/mok/MOK.der; else echo "Secure Boot Machine Owner Key not found"; fi</command>
+ </leafNode>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-secure-boot.xml.in b/op-mode-definitions/show-secure-boot.xml.in
new file mode 100644
index 000000000..ff731bac9
--- /dev/null
+++ b/op-mode-definitions/show-secure-boot.xml.in
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="secure-boot">
+ <properties>
+ <help>Show Secure Boot state</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/secure_boot.py show</command>
+ <children>
+ <leafNode name="keys">
+ <properties>
+ <help>Show enrolled certificates</help>
+ </properties>
+ <command>mokutil --list-enrolled</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>