Freeze catalog signature vectors (T-614)

This commit is contained in:
ila
2026-07-18 16:46:17 +08:00
parent 9e5f3f4840
commit 0c1b7662c6
11 changed files with 370 additions and 32 deletions
+2 -6
View File
@@ -2,7 +2,6 @@ package catalog
import (
"bytes"
"encoding/base64"
"encoding/hex"
"encoding/json"
"errors"
@@ -231,12 +230,9 @@ func validatePackage(architecture Architecture, publishedPackage Package) error
}
func validateSignature(value string) error {
signature, err := base64.StdEncoding.Strict().DecodeString(value)
_, err := decodeCanonicalSignature(value)
if err != nil {
return fmt.Errorf("must be strict Base64: %v", err)
}
if len(signature) != 64 {
return fmt.Errorf("must decode to 64 bytes")
return fmt.Errorf("must be canonical padded Base64 for 64 bytes: %v", err)
}
return nil
}