Skip to content

Commit 9441247

Browse files
committed
fix(sbom): adapt to upstream removal of liboqs/libxmss/liblms gates
Drop dead --dep-libxmss/liblms args after PRs wolfSSL#10292/wolfSSL#10293 removed those autoconf vars.
1 parent 3d5668e commit 9441247

4 files changed

Lines changed: 17 additions & 55 deletions

File tree

Makefile.am

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -437,12 +437,8 @@ sbom:
437437
--license-text '$(SBOM_LICENSE_TEXT)' \
438438
--options-h $(abs_builddir)/wolfssl/options.h \
439439
--lib "$$sbom_lib" \
440-
--dep-liboqs $(ENABLED_LIBOQS) \
441-
--dep-libxmss $(ENABLED_LIBXMSS) \
442-
--dep-libxmss-root '$(XMSS_ROOT)' \
443-
--dep-liblms $(ENABLED_LIBLMS) \
444-
--dep-liblms-root '$(LIBLMS_ROOT)' \
445440
--dep-libz $(ENABLED_LIBZ) \
441+
--dep-falcon $(ENABLED_FALCON) \
446442
--git '$(GIT)' \
447443
--cdx-out $(abs_builddir)/$(SBOM_CDX) \
448444
--spdx-out $(abs_builddir)/$(SBOM_SPDX); \

configure.ac

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12182,11 +12182,8 @@ AC_SUBST([WOLFSSL_INCLUDEDIR_ABS])
1218212182
AC_PATH_PROG([PYTHON3], [python3])
1218312183
AC_PATH_PROG([PYSPDXTOOLS], [pyspdxtools])
1218412184
AC_PATH_PROG([GIT], [git])
12185-
AC_SUBST([ENABLED_LIBOQS])
12186-
AC_SUBST([ENABLED_LIBXMSS])
12187-
AC_SUBST([ENABLED_LIBLMS])
1218812185
AC_SUBST([ENABLED_LIBZ])
12189-
AC_SUBST([LIBLMS_ROOT])
12186+
AC_SUBST([ENABLED_FALCON])
1219012187
1219112188
# Bomsh (OmniBOR build artifact tracing + SBOM enrichment)
1219212189
AC_PATH_PROG([BOMTRACE3], [bomtrace3])

doc/SBOM.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,12 @@ make sbom \
118118

119119
#### External dependency version detection
120120

121-
For dependencies with pkg-config support (`liboqs`, `libz`), the version is
122-
queried via `pkg-config --modversion` at generation time.
123-
124-
For dependencies without pkg-config (`libxmss`, `liblms`), wolfSSL is
125-
typically built against a source checkout rather than an installed package.
126-
The generator falls back to `git describe --tags --always` on the source
127-
tree root (passed via `configure` as `XMSS_ROOT` / `LIBLMS_ROOT`). If the
128-
source tree has no tags, `git describe` returns the short commit hash, which
129-
is recorded as-is. If the source tree is unavailable or `git` is not found:
121+
The remaining optional external dependencies (`libz`, and `falcon` via
122+
`liboqs`) are both installed packages and are queried via
123+
`pkg-config --modversion` at SBOM generation time.
124+
125+
If pkg-config does not report a version (the package is not installed, or
126+
its `.pc` file is missing):
130127

131128
- SPDX records `versionInfo: NOASSERTION` and emits no `purl` external ref.
132129
- CycloneDX omits the `version` and `purl` fields entirely and the generator

scripts/gen-sbom

Lines changed: 9 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -49,30 +49,17 @@ def build_timestamp():
4949
# Known metadata for optional external dependencies.
5050
# Version is detected at runtime via pkg-config; falls back to None.
5151
DEP_META = {
52-
'liboqs': {
53-
'name': 'liboqs',
54-
'supplier': 'Open Quantum Safe',
52+
# Falcon is reachable only via liboqs after upstream PR #10293 collapsed
53+
# the rest of the PQ surface into native wolfCrypt; we record the version
54+
# of liboqs itself since that is the artefact actually linked in.
55+
'falcon': {
56+
'name': 'falcon',
57+
'supplier': 'Open Quantum Safe (via liboqs)',
5558
'license': 'MIT',
5659
'download': 'https://github.com/open-quantum-safe/liboqs',
5760
'pkgconfig': 'liboqs',
5861
'purl': lambda v: f'pkg:github/open-quantum-safe/liboqs@{v}',
5962
},
60-
'libxmss': {
61-
'name': 'xmss-reference',
62-
'supplier': 'XMSS reference implementation authors',
63-
'license': 'CC0-1.0',
64-
'download': 'https://github.com/XMSS/xmss-reference',
65-
'pkgconfig': None,
66-
'purl': lambda v: f'pkg:github/XMSS/xmss-reference@{v}',
67-
},
68-
'liblms': {
69-
'name': 'hash-sigs',
70-
'supplier': 'Cisco Systems',
71-
'license': 'MIT',
72-
'download': 'https://github.com/cisco/hash-sigs',
73-
'pkgconfig': None,
74-
'purl': lambda v: f'pkg:github/cisco/hash-sigs@{v}',
75-
},
7663
'libz': {
7764
'name': 'zlib',
7865
'supplier': 'Jean-loup Gailly and Mark Adler',
@@ -486,18 +473,10 @@ def main():
486473
'licence reference.')
487474
parser.add_argument('--options-h', required=True,
488475
help='Path to wolfssl/options.h for build config')
489-
parser.add_argument('--dep-liboqs', default='no',
490-
help='yes if built with --with-liboqs')
491-
parser.add_argument('--dep-libxmss', default='no',
492-
help='yes if built with --with-libxmss')
493-
parser.add_argument('--dep-libxmss-root', default='',
494-
help='Path to xmss-reference source tree root')
495-
parser.add_argument('--dep-liblms', default='no',
496-
help='yes if built with --with-liblms')
497-
parser.add_argument('--dep-liblms-root', default='',
498-
help='Path to hash-sigs source tree root')
499476
parser.add_argument('--dep-libz', default='no',
500477
help='yes if built with --with-libz')
478+
parser.add_argument('--dep-falcon', default='no',
479+
help='yes if built with --enable-falcon (Falcon via liboqs)')
501480
parser.add_argument('--git', default='',
502481
help='Path to git binary for version detection')
503482
parser.add_argument('--cdx-out', required=True,
@@ -509,17 +488,10 @@ def main():
509488
global GIT_BIN
510489
GIT_BIN = args.git or None
511490

512-
if args.dep_libxmss_root:
513-
DEP_META['libxmss']['git_root'] = args.dep_libxmss_root
514-
if args.dep_liblms_root:
515-
DEP_META['liblms']['git_root'] = args.dep_liblms_root
516-
517491
enabled_deps = [
518492
key for key, flag in [
519-
('liboqs', args.dep_liboqs),
520-
('libxmss', args.dep_libxmss),
521-
('liblms', args.dep_liblms),
522493
('libz', args.dep_libz),
494+
('falcon', args.dep_falcon),
523495
]
524496
if flag.lower() == 'yes'
525497
]

0 commit comments

Comments
 (0)