Skip to content

Commit

Permalink
fixup! fixup! upgrade-iniramfs: Copy kernel hmac into /boot if FIPS
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Hecko committed Mar 26, 2023
1 parent e386163 commit 035486f
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,17 +212,15 @@ def copy_boot_files(context):
if len(hmac_file_lines) > 1:
details = ('Expected the target kernel HMAC file to containing only one HMAC line, '
'found {0}'.format(len(hmac_file_lines)))
raise StopActorExecutionError('Failed to prepare HMAC file for upgrade kernel.', details={'details': details})
raise StopActorExecutionError('Failed to prepare HMAC file for upgrade kernel.',
details={'details': details})

# Keep only non-empty strings after splitting on space
hmac, dummy_target_kernel_name = [fragment for fragment in hmac_file_lines[0].split(' ') if fragment]

with open(content.kernel_hmac_path, 'w') as upgrade_kernel_hmac_file:
upgrade_kernel_hmac_file.write('{hmac} {kernel}\n'.format(hmac=hmac, kernel=kernel))




api.produce(content)


Expand Down

0 comments on commit 035486f

Please sign in to comment.