2
0
mirror of https://opendev.org/x/pyghmi synced 2026-01-11 18:52:33 +00:00

Filter out UEFI boot certificates for BMC certificate candidates

Change-Id: Idf836b6d675e429879b164085ff2db84780754fc
This commit is contained in:
Jarrod Johnson
2025-10-31 08:26:47 -04:00
parent fab4d8e700
commit 9a2edebea5

View File

@@ -430,6 +430,8 @@ class OEMHandler(object):
certcollections.discard(candcoll)
elif 'KMIP' in candcoll: # not for TLS
certcollections.discard(candcoll)
elif 'Boot/Certificates' in candcoll:
certcollections.discard(candcoll)
if len(certcollections) > 1:
raise exc.PyghmiException('Multiple certificate collections found, unable to infer intended target for certificate operation')
certcoll = list(certcollections)[0]
@@ -462,6 +464,8 @@ class OEMHandler(object):
allcerts.discard(certurl)
elif 'KMIP' in certurl:
allcerts.discard(certurl)
elif 'Boot/Certificates' in certurl:
allcerts.discard(certurl)
if len(allcerts) > 1:
raise exc.PyghmiException('Multiple Certificates found, unable to infer intended target for certificate installation')
targcerturl = list(allcerts)[0]