Skip to content

Commit

Permalink
Enable bci-base-fips container for SP7 and SLE16
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkmueller committed Nov 26, 2024
1 parent dd416b5 commit c6bc266
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions src/bci_build/package/basecontainers.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def _get_fips_base_custom_end(os_version: OsVersion) -> str:
bins = _FIPS_15_SP2_BINARIES
case OsVersion.SP4:
bins = _FIPS_15_SP4_BINARIES
case OsVersion.SP5 | OsVersion.SP6:
case OsVersion.SP5 | OsVersion.SP6 | OsVersion.SP7 | OsVersion.SLE16_0:
pass
case _:
raise NotImplementedError(f"Unsupported os_version: {os_version}")
Expand All @@ -141,13 +141,11 @@ def _get_fips_base_custom_end(os_version: OsVersion) -> str:


def _get_fips_pretty_name(os_version: OsVersion) -> str:
match os_version:
case OsVersion.SP3:
return f"{os_version.pretty_os_version_no_dash} FIPS-140-2"
case OsVersion.SP4 | OsVersion.SP5 | OsVersion.SP6:
return f"{os_version.pretty_os_version_no_dash} FIPS-140-3"
case _:
raise NotImplementedError(f"Unsupported os_version: {os_version}")
if os_version == OsVersion.SP3:
return f"{os_version.pretty_os_version_no_dash} FIPS-140-2"
if os_version.is_sle15 or os_version.is_slfo:
return f"{os_version.pretty_os_version_no_dash} FIPS-140-3"
raise NotImplementedError(f"Unsupported os_version: {os_version}")


def _get_supported_until_fips(os_version: OsVersion) -> datetime.date:
Expand Down Expand Up @@ -198,7 +196,13 @@ def _get_supported_until_fips(os_version: OsVersion) -> datetime.date:
),
)
# SP5 is known to be having a non-working libgcrypt for FIPS mode
for os_version in (OsVersion.SP3, OsVersion.SP4, OsVersion.SP6)
for os_version in (
OsVersion.SP3,
OsVersion.SP4,
OsVersion.SP6,
OsVersion.SP7,
OsVersion.SLE16_0,
)
]


Expand Down

0 comments on commit c6bc266

Please sign in to comment.