mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-03 23:04:53 -04:00
Refactor tool output (#127)
Signed-off-by: Daniel Weiße <dw@edgeless.systems> Co-authored-by: Benedict Schlüter <bs@edgeless.systems>
This commit is contained in:
parent
eee2df9723
commit
90e0f41bde
2 changed files with 44 additions and 13 deletions
|
@ -17,9 +17,10 @@ import (
|
|||
)
|
||||
|
||||
type Server struct {
|
||||
log *logger.Logger
|
||||
server http.Server
|
||||
done chan<- struct{}
|
||||
log *logger.Logger
|
||||
server http.Server
|
||||
measurements map[uint32][]byte
|
||||
done chan<- struct{}
|
||||
}
|
||||
|
||||
func New(log *logger.Logger, done chan<- struct{}) *Server {
|
||||
|
@ -77,5 +78,12 @@ func (s *Server) logPCRs(w http.ResponseWriter, r *http.Request) {
|
|||
log.Infof("PCR 4 %x", pcrs[4])
|
||||
log.Infof("PCR 8 %x", pcrs[8])
|
||||
log.Infof("PCR 9 %x", pcrs[9])
|
||||
|
||||
s.measurements = pcrs
|
||||
|
||||
s.done <- struct{}{}
|
||||
}
|
||||
|
||||
func (s *Server) GetMeasurements() map[uint32][]byte {
|
||||
return s.measurements
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue