git: b22b999afc2d - main - libsecureboot restore default trust anchors

From: Simon J. Gerraty <sjg_at_FreeBSD.org>
Date: Fri, 06 Nov 2026 00:28:39 UTC
The branch main has been updated by sjg:

URL: https://cgit.FreeBSD.org/src/commit/?id=b22b999afc2d1ecb320928c03f2d8e0f6ae1c1fe

commit b22b999afc2d1ecb320928c03f2d8e0f6ae1c1fe
Author:     Simon J. Gerraty <sjg@FreeBSD.org>
AuthorDate: 2026-11-06 00:27:00 +0000
Commit:     Simon J. Gerraty <sjg@FreeBSD.org>
CommitDate: 2026-11-06 00:27:00 +0000

    libsecureboot restore default trust anchors
    
    If site.trust.mk does not set VE_SIGNATURE_LIST
    initialize it based on content of VE_SIGNATURE_EXT_LIST
    which is in turn initialized from TRUST_ANCHORS.
    
    Sponsored by:   Hewlett Packard Enterprise Development LP
    
    Reviewed by:    imp
    Differential Revision:  https://reviews.freebsd.org/D61245
---
 lib/libsecureboot/local.trust.mk | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/lib/libsecureboot/local.trust.mk b/lib/libsecureboot/local.trust.mk
index 01874c0604e6..e1f8cab3c718 100644
--- a/lib/libsecureboot/local.trust.mk
+++ b/lib/libsecureboot/local.trust.mk
@@ -102,9 +102,18 @@ VE_SIGNATURE_EXT_LIST?= ${TRUST_ANCHORS:T:Mt*.pem:R:S/ta_//}
 .endif
 
 .if ${TRUST_ANCHORS:T:Mt*.asc} != ""
-VE_SIGNATURE_LIST+= asc/OPENPGP/sha256/0
+VE_SIGNATURE_EXT_LIST+= asc
 ta_asc.h: ${TRUST_ANCHORS:M*.asc}
 .endif
+
+.if empty(VE_SIGNATURE_LIST)
+method.asc?= OPENPGP/sha256/0
+method.esig?= ECDSA/sha256/0
+.for ext in ${VE_SIGNATURE_EXT_LIST}
+VE_SIGNATURE_LIST+= ${ext}/${method.${ext}:URSA/sha256/0}
+.endfor
+.endif
+
 # we take the mtime of this as our baseline time
 BUILD_UTC_FILE?= ${TRUST_ANCHORS:[1]}
 .endif