mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-07-24 07:50:40 -04:00
image: allow toggling secure boot in image upload
This commit is contained in:
parent
c6ea596eb9
commit
3543fe140e
9 changed files with 74 additions and 41 deletions
|
@ -67,20 +67,24 @@ func runNOP(cmd *cobra.Command, provider cloudprovider.Provider, _ []string) err
|
|||
out = outF
|
||||
}
|
||||
|
||||
sbDatabase, uefiVarStore, err := loadSecureBootKeys(flags.pki)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
uploadReq := &osimage.UploadRequest{
|
||||
Provider: flags.provider,
|
||||
Version: flags.version,
|
||||
AttestationVariant: flags.attestationVariant,
|
||||
SBDatabase: sbDatabase,
|
||||
UEFIVarStore: uefiVarStore,
|
||||
SecureBoot: flags.secureBoot,
|
||||
Size: size,
|
||||
Timestamp: flags.timestamp,
|
||||
Image: file,
|
||||
}
|
||||
|
||||
if flags.secureBoot {
|
||||
sbDatabase, uefiVarStore, err := loadSecureBootKeys(flags.pki)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
uploadReq.SBDatabase = sbDatabase
|
||||
uploadReq.UEFIVarStore = uefiVarStore
|
||||
}
|
||||
|
||||
return uploadImage(cmd.Context(), archiveC, uploadC, uploadReq, out)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue