u-boot/tools/binman/btool/pkcs11_tool.py
Wojciech Dubowik e73443167b test: binman: Add test for pkcs11 signed capsule
Test pkcs11 URI support for UEFI capsule generation. Both
public certificate and private key are used over pkcs11
protocol.
Pkcs11-tool has been introduced as softhsm tool doesn't have
functionality to import certificates in commonly distributed
version (only in the latest).

Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@mt.com>
Reviewed-by: Simon Glass <simon.glass@canonical.com>
2026-03-18 06:14:17 -06:00

22 lines
636 B
Python

# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright 2026 Mettler Toledo Technologies GmbH
#
"""Bintool implementation for pkcs11-tool"""
from binman import bintool
class Bintoolpkcs11_tool(bintool.Bintool):
"""pkcs11-tool -- support tool for managing pkcs#11 tokens"""
def __init__(self, name):
super().__init__('pkcs11-tool',
'PKCS #11 tokens managing tool',
version_args='--show-info')
def fetch(self, method):
"""Install opensc via APT """
if method != bintool.FETCH_BIN:
return None
return self.apt_install('opensc')