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
|
@ -42,7 +42,7 @@ type AzureSEVSNPVersionSignature struct {
|
|||
|
||||
// JSONPath returns the path to the JSON file for the request to the config api.
|
||||
func (s AzureSEVSNPVersionSignature) JSONPath() string {
|
||||
return path.Join(attestationURLPath, variant.AzureSEVSNP{}.String(), s.Version, ".sig")
|
||||
return path.Join(attestationURLPath, variant.AzureSEVSNP{}.String(), s.Version+".sig")
|
||||
}
|
||||
|
||||
// URL returns the URL for the request to the config api.
|
||||
|
@ -53,7 +53,7 @@ func (s AzureSEVSNPVersionSignature) URL() (string, error) {
|
|||
// ValidateRequest validates the request.
|
||||
func (s AzureSEVSNPVersionSignature) ValidateRequest() error {
|
||||
if !strings.HasSuffix(s.Version, ".json") {
|
||||
return fmt.Errorf("version has no .json suffix")
|
||||
return fmt.Errorf("%s version has no .json suffix", s.Version)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue