Freeze catalog signature vectors (T-614)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user