mbox series

[meta-oe,v3,0/6] signing.bbclass: add certificate chain handling

Message ID 20250627-signing-set-ca-v3-0-030812797c6a@leica-geosystems.com
Headers show
Series signing.bbclass: add certificate chain handling | expand

Message

Johannes Schneider June 27, 2025, 5:40 a.m. UTC
Adding support for handling a complex PKI setup to the signing.bbclass

Since a (soft)HSM can only store a single certificate in one slot, the
relation between a leaf certificate, and it's signing intermediary (or
root) certificate has to be stored outside of the HSM, in the form of
some additional metadata.  This additional data is stored in an
environment variable, which is setup and manipulated by a set of
helper functions: signing_{get,set,has}_ca.

This patch-stack also does some cleanup of now superfluous code parts.

---
v4: added use-case to commit message of "signing.bbclass: add signing_get_intermediate_certs"

V3:
- reword commit message and comments following review suggestions
- forsee local.conf overrides for the CA

---

To: jlu@pengutronix.de
Cc: bsp-development.geo@leica-geosystems.com
Cc: openembedded-devel@lists.openembedded.org
Cc: raj.khem@gmail.com

---
Johannes Schneider (6):
      signing.bbclass: refactor signing_import_cert_from_*
      signing.bbclass: add set|get|has_ca functions
      signing.bbclass: add get_root_cert
      signing.bbclass: add signing_get_intermediate_certs
      signing.bbclass: add signing_extract_cert helpers
      signing.bbclass: remove signing_import_cert_chain_from_pem

 meta-oe/classes/signing.bbclass | 172 ++++++++++++++++++++++++++++++++--------
 1 file changed, 137 insertions(+), 35 deletions(-)
---
base-commit: 820047afe48a0d48056f4752defc3d2803c9d906
change-id: 20250618-signing-set-ca-f398259222f5

Best regards,