From: Rasmus Villemoes <ravi@prevas.dk>
To: u-boot@lists.denx.de
Cc: Neha Malcom Francis <n-francis@ti.com>,
Anshul Dalal <anshuld@ti.com>, Tom Rini <trini@konsulko.com>,
Simon Glass <sjg@chromium.org>, Rasmus Villemoes <ravi@prevas.dk>
Subject: [PATCH 2/6] binman: x509_cert: allow and parse distinguished-name subnode
Date: Fri, 10 Jul 2026 14:36:14 +0200 [thread overview]
Message-ID: <20260710123618.2036728-3-ravi@prevas.dk> (raw)
In-Reply-To: <20260710123618.2036728-1-ravi@prevas.dk>
Currently, the ti-secure and ti-secure-rom types hardcode the contents
of the Distinguished Name section. Those values are not necessarily
appropriate for all boards that just happen to include a SOC produced
by TI.
Allow placing a distinguished-name subnode inside the binman node
representing the Entry_x509_cert (or derived classes), and if present,
use that information.
Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
---
tools/binman/etype/ti_secure.py | 3 ++-
tools/binman/etype/ti_secure_rom.py | 3 ++-
tools/binman/etype/x509_cert.py | 5 +++++
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/tools/binman/etype/ti_secure.py b/tools/binman/etype/ti_secure.py
index f6caa0286d9..0d8ade9b634 100644
--- a/tools/binman/etype/ti_secure.py
+++ b/tools/binman/etype/ti_secure.py
@@ -117,7 +117,8 @@ class Entry_ti_secure(Entry_x509_cert):
self.firewall_cert_data['auth_in_place'] = auth_in_place
self.ReadFirewallNode()
self.sha = fdt_util.GetInt(self._node, 'sha', 512)
- self.req_dist_name = {'C': 'US',
+ if self.req_dist_name is None:
+ self.req_dist_name = {'C': 'US',
'ST': 'TX',
'L': 'Dallas',
'O': 'Texas Instruments Incorporated',
diff --git a/tools/binman/etype/ti_secure_rom.py b/tools/binman/etype/ti_secure_rom.py
index 7e90c655940..ec49fa51739 100644
--- a/tools/binman/etype/ti_secure_rom.py
+++ b/tools/binman/etype/ti_secure_rom.py
@@ -80,7 +80,8 @@ class Entry_ti_secure_rom(Entry_x509_cert):
self.dm_data = fdt_util.GetBool(self._node, 'dm-data', False)
if self.dm_data:
self.load_addr_dm_data = fdt_util.GetInt(self._node, 'load-dm-data', 0x00000000)
- self.req_dist_name = {'C': 'US',
+ if self.req_dist_name is None:
+ self.req_dist_name = {'C': 'US',
'ST': 'TX',
'L': 'Dallas',
'O': 'Texas Instruments Incorporated',
diff --git a/tools/binman/etype/x509_cert.py b/tools/binman/etype/x509_cert.py
index b6e8b0b4fb0..ee4c74db6f9 100644
--- a/tools/binman/etype/x509_cert.py
+++ b/tools/binman/etype/x509_cert.py
@@ -61,6 +61,11 @@ class Entry_x509_cert(Entry_collection):
self.key_fname = self.GetEntryArgsOrProps([
EntryArg('keyfile', str)], required=True)[0]
self.sw_rev = fdt_util.GetInt(self._node, 'sw-rev', 1)
+ dist_name_node = self._node.FindNode('distinguished-name')
+ if dist_name_node:
+ self.req_dist_name = dict()
+ for pname, prop in dist_name_node.props.items():
+ self.req_dist_name[pname] = prop.value
def GetCertificate(self, required, type='generic'):
"""Get the contents of this entry
--
2.55.0
next prev parent reply other threads:[~2026-07-10 12:36 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-10 12:36 [PATCH 0/6] k3-binman ergonomics Rasmus Villemoes
2026-07-10 12:36 ` [PATCH 1/6] binman: openssl: refactor creation of Distinguished Name section from dict Rasmus Villemoes
2026-07-13 12:40 ` Simon Glass
2026-07-14 5:29 ` Neha Malcom Francis
2026-07-10 12:36 ` Rasmus Villemoes [this message]
2026-07-13 12:40 ` [PATCH 2/6] binman: x509_cert: allow and parse distinguished-name subnode Simon Glass
2026-07-10 12:36 ` [PATCH 3/6] binman: x509: fix CN emitted for basic x509 certificates Rasmus Villemoes
2026-07-13 12:41 ` Simon Glass
2026-07-10 12:36 ` [PATCH 4/6] k3-binman.dtsi: add keyfile_template node Rasmus Villemoes
2026-07-13 12:41 ` Simon Glass
2026-07-10 12:36 ` [PATCH 5/6] k3-binman.dtsi: add empty distinguished_name_template Rasmus Villemoes
2026-07-13 12:41 ` Simon Glass
2026-07-10 12:36 ` [PATCH 6/6] k3-binman.dtsi: insert keyfile and distinguished name templates in all ti-secure(-rom) nodes Rasmus Villemoes
2026-07-13 12:55 ` Simon Glass
2026-07-13 14:53 ` Rasmus Villemoes
2026-07-13 15:18 ` Simon Glass
2026-07-13 12:19 ` [PATCH 0/6] k3-binman ergonomics Anshul Dalal
2026-07-13 12:54 ` Rasmus Villemoes
2026-07-14 5:36 ` Anshul Dalal
2026-07-13 12:56 ` [0/6] " Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260710123618.2036728-3-ravi@prevas.dk \
--to=ravi@prevas.dk \
--cc=anshuld@ti.com \
--cc=n-francis@ti.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox