From a0a4f1d590518cdfc592a368c112993b6b0da600 Mon Sep 17 00:00:00 2001
From: Shurong Cao <170531907+CAOShurong@users.noreply.github.com>
Date: Thu, 13 Aug 2026 17:26:23 +0800
Subject: [PATCH] fix: align protocol cryptographic assets in XML
Allow protocol properties to use the preferred relatedCryptographicAssets representation already supported by JSON Schema and Protobuf. Extend the full cryptography fixtures across all three formats to cover the field.
Signed-off-by: Shurong Cao <170531907+CAOShurong@users.noreply.github.com>
---
schema/bom-1.7.xsd | 37 +++++++++++++++++++
.../1.7/valid-cryptography-full-1.7.json | 12 +++++-
.../1.7/valid-cryptography-full-1.7.textproto | 10 +++++
.../1.7/valid-cryptography-full-1.7.xml | 10 +++++
4 files changed, 68 insertions(+), 1 deletion(-)
diff --git a/schema/bom-1.7.xsd b/schema/bom-1.7.xsd
index 59111cba0..bb8f10698 100644
--- a/schema/bom-1.7.xsd
+++ b/schema/bom-1.7.xsd
@@ -8298,6 +8298,43 @@ limitations under the License.
A protocol-related cryptographic assets
+
+
+
+ A list of cryptographic assets related to this component.
+
+
+
+
+
+
+
+ A cryptographic asset related to this component.
+
+
+
+
+
+
+
+ Specifies the mechanism by which the cryptographic asset is secured by.
+ Examples: "publicKey", "privateKey", "algorithm"
+
+
+
+
+
+
+ The bom-ref to cryptographic asset.
+
+
+
+
+
+
+
+
+
diff --git a/tools/src/test/resources/1.7/valid-cryptography-full-1.7.json b/tools/src/test/resources/1.7/valid-cryptography-full-1.7.json
index d03b237e1..709d718c8 100644
--- a/tools/src/test/resources/1.7/valid-cryptography-full-1.7.json
+++ b/tools/src/test/resources/1.7/valid-cryptography-full-1.7.json
@@ -239,7 +239,17 @@
"algorithm": "ecdsa_secp256r1_sha256"
}
]
- }
+ },
+ "relatedCryptographicAssets": [
+ {
+ "type": "algorithm",
+ "ref": "asset-1"
+ },
+ {
+ "type": "certificate",
+ "ref": "asset-2"
+ }
+ ]
},
"oid": "oid:1.3.6.1.5.5.7.3.1"
}
diff --git a/tools/src/test/resources/1.7/valid-cryptography-full-1.7.textproto b/tools/src/test/resources/1.7/valid-cryptography-full-1.7.textproto
index 3552caf66..01ee05368 100644
--- a/tools/src/test/resources/1.7/valid-cryptography-full-1.7.textproto
+++ b/tools/src/test/resources/1.7/valid-cryptography-full-1.7.textproto
@@ -231,6 +231,16 @@ components: {
algorithm: "ecdsa_secp256r1_sha256"
}
}
+ relatedCryptographicAssets: {
+ assets: {
+ type: "algorithm"
+ ref: "asset-1"
+ }
+ assets: {
+ type: "certificate"
+ ref: "asset-2"
+ }
+ }
}
oid: "oid:1.3.6.1.5.5.7.3.1"
}
diff --git a/tools/src/test/resources/1.7/valid-cryptography-full-1.7.xml b/tools/src/test/resources/1.7/valid-cryptography-full-1.7.xml
index 7201e741b..7b7a8f78d 100644
--- a/tools/src/test/resources/1.7/valid-cryptography-full-1.7.xml
+++ b/tools/src/test/resources/1.7/valid-cryptography-full-1.7.xml
@@ -220,6 +220,16 @@
ecdsa_secp256r1_sha256
+
+
+ algorithm
+ [asset-1]
+
+
+ certificate
+ [asset-2]
+
+
oid:1.3.6.1.5.5.7.3.1