mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-07-20 05:51:46 -04:00
deps: update go-uefi and use new authenticode package (#2873)
This commit is contained in:
parent
70c0a1969d
commit
18acd0b12a
7 changed files with 153 additions and 53 deletions
|
@ -8,6 +8,7 @@ package main
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto"
|
||||
"crypto/sha256"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
@ -93,7 +94,7 @@ func measurePE(fs afero.Fs, peFile string) ([]byte, error) {
|
|||
}
|
||||
defer f.Close()
|
||||
|
||||
return measure.Authentihash(f, sha256.New())
|
||||
return measure.Authentihash(f, crypto.SHA256)
|
||||
}
|
||||
|
||||
func precalculatePCR4(simulator *measure.Simulator, fs afero.Fs, ukiFile string) error {
|
||||
|
@ -111,7 +112,7 @@ func precalculatePCR4(simulator *measure.Simulator, fs afero.Fs, ukiFile string)
|
|||
if err != nil {
|
||||
return fmt.Errorf("uki does not contain linux kernel image: %v", err)
|
||||
}
|
||||
linuxMeasurement, err := measure.Authentihash(linuxSectionReader, sha256.New())
|
||||
linuxMeasurement, err := measure.Authentihash(linuxSectionReader, crypto.SHA256)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to measure linux kernel image: %v", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue