mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-07-21 14:28:54 -04:00
api: use new signature JSON format (#1872)
* use new impl for client.UploadAzureSEVSNP * fix: fetcher must parse new signature format * version-file is not persistentflag * fix fetcher tests
This commit is contained in:
parent
fa01569cc6
commit
99a88c033c
7 changed files with 77 additions and 143 deletions
|
@ -93,7 +93,14 @@ func (f *fakeConfigAPIHandler) RoundTrip(req *http.Request) (*http.Response, err
|
|||
|
||||
} else if req.URL.Path == "/constellation/v1/attestation/azure-sev-snp/2021-01-01-01-01.json.sig" {
|
||||
res := &http.Response{}
|
||||
res.Body = io.NopCloser(bytes.NewReader(f.signature))
|
||||
obj := configapi.AzureSEVSNPVersionSignature{
|
||||
Signature: f.signature,
|
||||
}
|
||||
bt, err := json.Marshal(obj)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
res.Body = io.NopCloser(bytes.NewReader(bt))
|
||||
res.StatusCode = http.StatusOK
|
||||
return res, nil
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue