summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojciech Dubowik <[email protected]>2026-02-20 10:15:12 +0100
committerSimon Glass <[email protected]>2026-03-18 06:14:17 -0600
commita8c8ebc8064183921ed419130df229a9d5d43192 (patch)
treea611100994e20717300e75df7a6df5d063cafae7
parent0c716a157be460006a4b762625de329b5e36dbf9 (diff)
binman: Accept pkcs11 URI tokens for capsule updates
With pkcs11 support in mkeficapsule we can now accept URI tokens and not only files. Signed-off-by: Wojciech Dubowik <[email protected]> Reviewed-by: Simon Glass <[email protected]>
-rw-r--r--tools/binman/etype/efi_capsule.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/binman/etype/efi_capsule.py b/tools/binman/etype/efi_capsule.py
index 9f06cc88e6e..3b30c12ea51 100644
--- a/tools/binman/etype/efi_capsule.py
+++ b/tools/binman/etype/efi_capsule.py
@@ -125,10 +125,14 @@ class Entry_efi_capsule(Entry_section):
private_key = ''
public_key_cert = ''
if self.auth:
- if not os.path.isabs(self.private_key):
+ if not os.path.isabs(self.private_key) and not 'pkcs11:' in self.private_key:
private_key = tools.get_input_filename(self.private_key)
- if not os.path.isabs(self.public_key_cert):
+ if not os.path.isabs(self.public_key_cert) and not 'pkcs11:' in self.public_key_cert:
public_key_cert = tools.get_input_filename(self.public_key_cert)
+ if 'pkcs11:' in self.private_key:
+ private_key = self.private_key
+ if 'pkcs11:' in self.public_key_cert:
+ public_key_cert = self.public_key_cert
data, payload, uniq = self.collect_contents_to_file(
self._entries.values(), 'capsule_in')
outfile = self._filename if self._filename else 'capsule.%s' % uniq